Displaying 3 results from an estimated 3 matches for "routescontroller".
2007 Dec 16
3
how do I spec my Rails routes?
Once again, here''s something I haven''t figured out. Apologies if this
is too newb-ish, but, how do I spec my routes using RSpec-Rails?
In particular, I''ve got a catch-all route that needs to catch a wide
variety of URLs:
map.document ''*url'', :controller => ''documents'', :action => ''show''
Is there a way to
2009 Feb 03
3
ROXML from_xml not returning an object instance...
...cted an XML representation so I can use AJAX to create a
Route with all waypoints in a single create call to RouteController.
When I call Route.from_xml(xmlString) it is not returning an object -
it''s leaving the object (@route) nil, but not erroring. Any ideas?
Here''s some code:
RoutesController:
def create
@route = nil;
if params[:requestXML]
# unserialise from XML using ROXML
@route = Route.from_xml(params[:requestXML]);
else
@route = Route.new(params[:route])
end
respond_to do |format|
#The following line unsurprisingly fails, as @rou...
2005 Dec 15
0
Creating and managing Rails routes on the fly
Here is what I''d like to be able to do:
I want to be able administer routes using a rails application. So an
interface
would list routes and give users the ability to manage these on the fly:
class RoutesController < ApplicationController
# very simple example
def add
...
Routes.connect ''customurl'', :controller => "customcontroller",
:controller => "customaction"
Routes.save # save user created routes back to routes.rb file or
some other sto...