Does this support rails4 strong parameters?
elbbub opened this issue · comments
If I execute command "r g acts-as-messageable:migration", I get error about strong_parameters as following:
ruby-1.9.3-p286/gems/activemodel-4.0.0/lib/active_model/deprecated_mass_assignment_security.rb:17:in attr_accessible':
attr_accessibleis extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add
protected_attributes` to your Gemfile to use old one. (RuntimeError)
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/message.rb:8:in <class:Message>' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/message.rb:4:in
module:ActsAsMessageable'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/message.rb:3:in <top (required)>' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:228:in
const_get'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:228:in block in constantize' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in
each'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in inject' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in
constantize'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/core_ext/string/inflections.rb:66:in constantize' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/acts-as-messageable-0.4.8/lib/acts-as-messageable/model.rb:34:in
acts_as_messageable'
from /home/elbbub/D.works/projects/_garage/messageable-app/app/models/user.rb:11:in <class:User>' from /home/elbbub/D.works/projects/_garage/messageable-app/app/models/user.rb:1:in
<top (required)>'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:423:in load' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:423:in
block in load_file'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:615:in new_constants_in' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:422:in
load_file'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:323:in require_or_load' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:462:in
load_missing_constant'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in const_missing' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in
const_get'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in block in constantize' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in
each'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in inject' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in
constantize'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:534:in get' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:565:in
constantize'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise.rb:285:in get' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/mapping.rb:77:in
to'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/mapping.rb:72:in modules' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/mapping.rb:89:in
routes'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/mapping.rb:156:in default_used_route' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/mapping.rb:66:in
initialize'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise.rb:319:in new' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise.rb:319:in
add_mapping'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/rails/routes.rb:210:in block in devise_for' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/rails/routes.rb:209:in
each'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/devise-3.1.0/lib/devise/rails/routes.rb:209:in devise_for' from /home/elbbub/D.works/projects/_garage/messageable-app/config/routes.rb:2:in
block in <top (required)>'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in instance_exec' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in
eval_block'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in draw' from /home/elbbub/D.works/projects/_garage/messageable-app/config/routes.rb:1:in
<top (required)>'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in load' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in
block in load'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in load_dependency' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in
load'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in block in load_paths' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in
each'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in load_paths' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in
reload!'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in block in updater' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in
call'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in execute' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in
updater'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in execute_if_updated' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in
block in module:Finisher'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/initializable.rb:30:in instance_exec' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/initializable.rb:30:in
run'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/initializable.rb:55:in block in run_initializers' from /home/elbbub/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/tsort.rb:150:in
block in tsort_each'
from /home/elbbub/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/tsort.rb:183:in block (2 levels) in each_strongly_connected_component' from /home/elbbub/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/tsort.rb:219:in
each_strongly_connected_component_from'
from /home/elbbub/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/tsort.rb:182:in block in each_strongly_connected_component' from /home/elbbub/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/tsort.rb:180:in
each'
from /home/elbbub/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/tsort.rb:180:in each_strongly_connected_component' from /home/elbbub/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/tsort.rb:148:in
tsort_each'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/initializable.rb:54:in run_initializers' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application.rb:215:in
initialize!'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in method_missing' from /home/elbbub/D.works/projects/_garage/messageable-app/config/environment.rb:5:in
<top (required)>'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in require' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in
block in require'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in load_dependency' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in
require'
from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/application.rb:189:in require_environment!' from /home/elbbub/.rvm/gems/ruby-1.9.3-p286/gems/railties-4.0.0/lib/rails/commands.rb:45:in
<top (required)>'
Hi,
Try to put gem 'acts-as-messageable', :git => 'git://github.com/LTe/acts-as-messageable.git', branch: 'master'
in your gemfile, instead of gem 'acts-as-messageable'
.
I was having the same issue, but I solved it like this.