Open marcosserpa opened 7 years ago
Hey there,
The exception at hand isn't tied to RocketPants - It's something else in ActiveRecord::Base
/ ActiveRecord::Base
is loading.
Unfortunately, I can't tell from the trace - but a quick google shows this may be the cause? http://stackoverflow.com/questions/28822707/when-upgrading-from-rails-3-2-to-rails-4-why-does-rake-give-uninitialized-cons
Unfortunately slugged just surfaces it, because we load ActiveRecord :) I'd try bumping rails to '~> 4.0.0' (whatever the highest 4.0 patch level is) and start from there?
Thanks
Hi!
I already did this. And this not resolves. The only thing that resolves is to make sure it will be only load when Active Support is loaded, like this:
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.extend Slugged::ActiveRecordMethods
end
Hi Marcos,
This is happening because Rails changed how it handles mass assignment protection. They're now using Strong Parameters. This might help you with the transition: http://carreno.me/articles/how-to-upgrade-to-strong-parameters-in-rails
Guys, I'm trying to upgrade an application from Rails 3.2.22 to 4.0.13 and I'm getting
Gem Load Error is: uninitialized constant ActiveModel::ForbiddenAttributesProtection
when trying to load slugged gem (2.0.0). The gem was suppose to be ready for Rails 4.0.x. That error was not suppose to be happening.The error trace:
My Gemfile:
Rails is already in 4.0.0. Ruby, 2.1.8.
Thanks! <3