activewarehouse / activewarehouse-etl

Extract-Transform-Load library from ActiveWarehouse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mass-assignment protection of control_file, status, batch_id in the etl_execution database

pgericson opened this issue · comments

I ran into this problem
/gems/activemodel-3.2.3/lib/active_model/mass_assignment_security/sanitizer.rb:48:in process_removed_attributes': Can't mass-assign protected attributes: control_file, status, batch_id (ActiveModel::MassAssignmentSecurity::Error) from /Users/username/.rvm/gems/ruby-1.9.3-p194@project/gems/activemodel-3.2.3/lib/active_model/mass_assignment_security/sanitizer.rb:20:indebug_protected_attribute_removal'

I am loading the rails environment (version 3.2.3) in a common.rb file
since these settings are set in the gem as of now I consider this a bug, or am just implementing it wrong?

Hi Peter,

Thanks for taking the time to report this!

I think this is likely related to Rails 3.2.3 change on whitelist_attributes:

http://weblog.rubyonrails.org/2012/3/30/ann-rails-3-2-3-has-been-release

So this is very likely a bug which just appeared, not an issue on your side!

Can you try with Rails 3.2.2 to see if things work there?

-- Thibaut

Le 16 mai 2012 à 17:49, Peter Glerup Ericson
reply@reply.github.com
a écrit :

I ran into this problem
/gems/activemodel-3.2.3/lib/active_model/mass_assignment_security/sanitizer.rb:48:in process_removed_attributes': Can't mass-assign protected attributes: control_file, status, batch_id (ActiveModel::MassAssignmentSecurity::Error) from /Users/username/.rvm/gems/ruby-1.9.3-p194@project/gems/activemodel-3.2.3/lib/active_model/mass_assignment_security/sanitizer.rb:20:indebug_protected_attribute_removal'

I am loading the rails environment (version 3.2.3) in a common.rb file
since these settings are set in the gem as of now I consider this a bug, or am just implementing it wrong?


Reply to this email directly or view it on GitHub:
#96

i made this fix:
#97

I don't know if this is the correct thing to do, but since it is a gem and behind all kinds of things and is decoupled from the real application it should not be an issue.

Looks ok to me! If someone meets an issue, he will re-open.

Merged + upgraded the test config to Rails 3.2.3, let's see how it goes. Closing this, thanks again!