puffer/puffer — Issue #31: name use in form is not the same as name in controller params
Author: cs3b
Created: 2011-11-19 12:54:42+00:00
State: open

lib/puffer/resource.rb#128

def attributes
throw [params, name]
params[name.to_s.singularize]
end

and when I try to update:

ArgumentError (uncaught throw [{"utf8"=>"✓", "_method"=>"put", "authenticity_token"=>"gMkKL+AVwisos7CDHK88XD3/RAYmR7PgNiUuhOXSpK4=", "cms_menu_item"=>{"name"=>"O Nas i Nie Nas", "menu_id"=>"4ec79997c566db1a1300015d", "page_id"=>"4ec79997c566db1a1300015e"}, "commit"=>"Save", "puffer_scope"=>:admin, "puffer"=>menu_items, "action"=>"update", "controller"=>"admin/menu_items", "id"=>"4ec79997c566db1a1300015f"}, :menu_items]):

params have name ( from form) cms_menu_item, but name in resource is :menu_item