Closed julesce closed 12 years ago
I'll release a new version shortly, thanks!
hi, has there been a fix done for this yet? Thanks Robbie
fix was merged from #84 and #85 so it should works already on master branch, if not give me know I will check and fix again ;)
I just need to push a new gem
Please remind me it this isn't done in 3 hours' time
Thanks! :-)
Hi! Is it me or this happens again in 2.0.4 ? thnx!!
Yep it seems that bug back ;)
@parndt why did You change it again?
I have refinerycms 2.0.4 and I created a custom engine. When I used it to add a record it threw the same error! Any solution that also applies to custom engines?
more details on my error:
ActiveModel::MassAssignmentSecurity::Error in Refinery::Pianos::Admin::PianosController#update
Can't mass-assign protected attributes: dimensions, manufactured_on(1i), manufactured_on(2i), manufactured_on(3i), upright, photo_id, description
@krakatoa, @mitfik I can't reproduce this bug and I'm pretty sure @parndt hasn't changed anything.
@aghyad the error explanation is right in front of you. Add all of these attributes to attr_accessible list in pianos model.
@ugisozols I already did and it worked of course, but I am asking if it is possible to include the solution in the engine so it avoids generating this issue again when generating custom engines. For now, my advice to everyone is to just go to your added engine's model and add the attributes causing the error to raise.
@aghyad the best option would be to use 2-0-stable branch of refinery's github repo as it contains this fix.
# in Gemfile
gem "refinerycms", :git => "https://github.com/resolve/refinerycms.git",
:branch => "2-0-stable"
@ugisozols here is link to his changes: https://github.com/resolve/refinerycms-news/commit/d49180fa788c0b4908e4707aa3afa32ba38db998 It was made few moments after he merge my fix for this bug. I do not know maybe he find out some other solution for this problem or maybe this cause some other problmes. But as You can see bug is back :)
As I said before I can't reproduce this issue and d49180fa788c0b4908e4707aa3afa32ba38db998 just removes unnecessary if...else so I'm not sure what's the real problem here.
The problem is not unnecessary if ... else but namespacing of this class and if ... else statement is just to avoid error when class is not defined yet.
Hi guys,
I've got a fresh install of Refinery 2.0.3, and am getting this error when trying to create a new article in the admin section:
ActiveModel::MassAssignmentSecurity::Error in Refinery/news/admin/items#new
Showing c:/Ruby192/lib/ruby/gems/1.9.1/gems/refinerycms-news-2.0.0/app/views/refinery/news/admin/items/_form.html.erb where line #15 raised:
Can't mass-assign protected attributes: locale Extracted source (around line #15):
Thanks in advance for any help :-)