Ryan Moats
unread,Sep 27, 2011, 1:47:07 PM9/27/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ActiveScaffold : Ruby on Rails plugin
Has anybody managed to get custom RESTful actions working with the
active_scaffold 3.1.2 gem?
I've done the following:
-added the custom action that I want to use to the routing table via
resources :worlds do
get 'finish', :on => :member
as_routes
end
-confirmed the URL and HTTP verb with rake routes
finish_worlds GET /worlds/:id/finish(.:format)
{:action=>"finish", :controller=>"worlds}
-added the necessary methods to the controller module
-verified that the methods are reached if I put in the proper URL to
a browser window
(in this case /worlds/1/finish)
But, as soon as I add the method with config.action_links.add, I get a
routing error when trying to go to /worlds
the controller module looks like:
Class WorldController < ApplicationController
active_scaffold :world do |conf|
conf.action_links.add 'finish'
end
def finish
end
end
leads to
No route matches {:controller=>"worlds", :action=>"finish"}
when trying to render the group action links in line 19 of
_action_group.html.erb
Any ideas? Thanks in advance
Ryan Moats