2010/5/13 Iñaki Baz Castillo <[email protected]>:
> 2010/5/13 Iñaki Baz Castillo <[email protected]>:
>> This last solution fails as I think it's trying to use @record which
>> is empty in this case (I'm not handling a member in the controller):
>
> But I can fix it by maunally setting @record in the action methd :)
However I don't like it. By inspecting "rake routes" I see:
empty_dst_black_lists GET /dst_black_lists/empty(.:format)
{:controller=>"dst_black_lists", :action=>"empty"}
But it should be (note the :id):
empty_dst_black_lists GET /dst_black_lists/:id/empty(.:format)
{:controller=>"dst_black_lists", :action=>"empty"}
I get it by setting the following rule:
map.resources :dst_black_lists, :active_scaffold => true,
:collection => {:regex_reload => :get}, :member => {:empty => :get}
In this way I "expect" that Rails itself (RESTful) would autogenerate
the @record instance based on .id parameter, am I right? Unfortunately
it doesn't work, I still have to set @record based on the params[:id].
Sure I miss something :(
Thanks a lot.
--
Iñaki Baz Castillo
<[email protected]>
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.