Skip to content

Commit f39fa50

Browse files
author
Jed Schneider
committed
remove references to attr_accessible
1 parent 0e953e2 commit f39fa50

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

sites/curriculum/hooking_up_votes_and_topics.step

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,12 @@ goals {
1717
}
1818

1919
steps {
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
3825
class Topic < ActiveRecord::Base
39-
attr_accessible :description, :title
4026
has_many :votes, dependent: :destroy
4127
end
4228
RUBY
@@ -46,7 +32,6 @@ end
4632
message "Edit `app/models/vote.rb` so that it looks like this:"
4733
source_code :ruby, <<-RUBY
4834
class Vote < ActiveRecord::Base
49-
attr_accessible :topic_id
5035
belongs_to :topic
5136
end
5237
RUBY

0 commit comments

Comments
 (0)