jipiboily / spree_multi_lingual

Spree multi-lingual is a plugin to make multi locale store with Spree possible
BSD 3-Clause "New" or "Revised" License
49 stars 56 forks source link

Can't mass-assign protected attributes #7

Closed vagels closed 12 years ago

vagels commented 12 years ago

I got message "Can't mass-assign protected attributes: locale" when doing the migration.

sbounmy commented 12 years ago

can you specify which version of spree and spree_multi_lingual you are using ?

vagels commented 12 years ago

Using spree (1.1.1) Using spree_multi_lingual (0.1.0.alpha1) from git://github.com/sbounmy/spree_multi_lingual.git (at master)

vagels commented 12 years ago

After clean install (wo data) in migrations all is ok, but

ActiveModel::MassAssignmentSecurity::Error in Spree/home#index

Showing .../gems/spree_core-1.1.1/app/views/spree/shared/_taxonomies.html.erb where line #3 raised:

Can't mass-assign protected attributes: locale

sbounmy commented 12 years ago

my fork is no longer maintained. This repo with the branch 1-0-stable is the last up-to-date. You can maybe try to update the dependencies to spree 1.1 and give it a try.

I will asap provide a spree 1.1 support

jipiboily commented 12 years ago

the @sbounmy fork was specified in README, just fixed that. That said, this is probably an issue.

@vagels: are you using latest Rails (3.2.3)? With config.active_record.whitelist_attributes set to true, right?

vagels commented 12 years ago

yes 3.2.3 and true

sbounmy commented 12 years ago

@vagels I just pushed a 1-1-stable branch, can you please give it a try ? @jipiboily would be great to have this repo running on travis, can you link it with your account ?

sbounmy commented 12 years ago

@jipiboily nevermind, it is already setup. It's late I think I need some sleep!

sbounmy commented 12 years ago

@vagels looks like the issue remains, locale is still protected. https://github.com/svenfuchs/globalize3/issues/128 is a temporary fix, I will looking into this tomorrow.

sbounmy commented 12 years ago

@vagels I did the quick fix, you can try now :)

sbounmy commented 12 years ago

I am closing this, if this occurs again we will reopen. thanks!