LTe / acts-as-messageable

Gem that allows communication between the models.

Home Page:http://lte.github.io/acts-as-messageable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does this support rails4 strong parameters?

elbbub opened this issue · comments

commented

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 addprotected_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:inmodule: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:inconst_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:ineach'
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:inconstantize'
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:inacts_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:inblock 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:inload_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:inload_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:inconst_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:ineach'
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:inconstantize'
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:inconstantize'
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:into'
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:inroutes'
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:ininitialize'
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:inadd_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:ineach'
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:inblock 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:ineval_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:inblock 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:inload'
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:ineach'
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:inreload!'
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:incall'
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:inupdater'
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:inblock 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:inrun'
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:inblock 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:ineach_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:ineach'
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:intsort_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:ininitialize!'
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:inblock 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:inrequire'
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.

@elbbub please use master branch. Thank @Cylix for response ;)