Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

activerecord 4.0.0 undefined method mass_assignment_sanitizer #1333

Closed
WaYdotNET opened this issue Jul 5, 2013 · 8 comments
Closed

activerecord 4.0.0 undefined method mass_assignment_sanitizer #1333

WaYdotNET opened this issue Jul 5, 2013 · 8 comments
Labels
Milestone

Comments

@WaYdotNET
Copy link
Contributor

with activerecord and mini_record i've this error

padrino g admin

undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class

 undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class
  /home/waydotnet/.gem/ruby/1.9.3/gems/activerecord-4.0.0/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
  /home/waydotnet/works/2013/yourcar/config/database.rb:50:in `<top (required)>'

@dariocravero
Copy link

Looks like this is related to AR's mass assignment feature being extracted on its own gem. Anyone using AR and willing to provide a guide on how to migrate to it? :)

The auto explain feature is also gone.

Therefore we should be removing ActiveRecord::Base.mass_assignment_sanitizer = :strict and ActiveRecord::Base.auto_explain_threshold_in_seconds = 0.5 for 4.x.

Working on a PR now for 0.11.x.

@jkoutavas
Copy link

I've been a /user/ (not a developer) of Padrino 0.10.7 for awhile. Been wanting to move up to Padrino 0.11.2 but this bug is stopping me. ETA for a fix?

@dariocravero
Copy link

Hey there, the quickest fix is to remove the offending lines from your
config/database.rb as I explained on my previous post. It completely
slipped my mind to release a patch for it, will try to do so these days.

On Wednesday, July 24, 2013, jkoutavas wrote:

I've been a /user/ (not a developer) of Padrino 0.10.7 for awhile. Been
wanting to move up to Padrino 0.11.2 but this bug is stopping me. ETA for a
fix?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1333#issuecomment-21514934
.

Darío

@jkoutavas
Copy link

Ah, thanks, I didn't realize it was that simple (wasn't sure of the file to edit.)

@dariocravero
Copy link

:)

@ujifgc
Copy link
Member

ujifgc commented Oct 17, 2013

So, for #1414 we should delete these lines? https://github.com/padrino/padrino-framework/blob/master/padrino-gen/lib/padrino-gen/generators/components/orms/activerecord.rb#L31-L37

@dariocravero
Copy link

Yes @ujifgc

ujifgc added a commit that referenced this issue Oct 24, 2013
@ujifgc
Copy link
Member

ujifgc commented Oct 24, 2013

Fixed in #1414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants