File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -17,26 +17,12 @@ goals {
1717}
1818
1919steps {
20- step 'Edit the Gemfile' do
21- message "In order to save votes through the Topic model we must allow Rails to whitelist specific attributes for each model."
22- message "In Rails 4, this functionality is provided in a separate gem. We need to install that gem in order to save the votes."
23- message "Open the `Gemfile` in your text editor. Under the declaration for the `rails` gem add the following line of code:"
24-
25- source_code :ruby, <<-RUBY
26- gem 'strong_parameters'
27- RUBY
28- end
29-
30- step "Apply the Gemfile changes" do
31- console "bundle install"
32- end
3320
3421 step {
3522 message "Edit `app/models/topic.rb` so that it looks like this:"
3623
3724 source_code :ruby, <<-RUBY
3825class Topic < ActiveRecord::Base
39- attr_accessible :description, :title
4026 has_many :votes, dependent: :destroy
4127end
4228 RUBY
4632 message "Edit `app/models/vote.rb` so that it looks like this:"
4733 source_code :ruby, <<-RUBY
4834class Vote < ActiveRecord::Base
49- attr_accessible :topic_id
5035 belongs_to :topic
5136end
5237 RUBY
You can’t perform that action at this time.
0 commit comments