I'm using Rails 4 and want to define dynamic attributes, something like:
(0..6).each do |i|
attr_accessible "attr-#{i}"
right now it's failling saying
NoMethodError: undefined method `attr_accessible' for #<Class:0x007fdeb8911380>
I believe this is because attr_accessible is no longer use in Rails 4, so how could i achieve this? Thanks.