leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
537 stars 215 forks source link

ForbiddenAttributeError when using :extra_parameters fix #266

Closed lonski closed 8 years ago

lonski commented 8 years ago

Hello!

Recently I encountered a problem when trying to create saved_querries per user. I fallowed the instructions from here: https://github.com/leikind/wice_grid/blob/rails3/SAVED_QUERIES_HOWTO.md

But after all I saw:

ActiveModel::ForbiddenAttributesError (ActiveModel::ForbiddenAttributesError):
  activemodel (4.2.3) lib/active_model/forbidden_attributes_protection.rb:21:in `sanitize_for_mass_assignment'

I tracked that it complained because of mass attribute assigment using 'raw' parameters. I prepared a simple fix. Comments are welcomed.

Regards, Michał

leikind commented 8 years ago

Thanks

leikind commented 8 years ago

This functionality has not been worked on for quite some time, and I wanted to throw i away many times

lonski commented 8 years ago

Now it seems to work well. I did not encounter any more issues yet.

Regards