Pass Additional Parameters to REST Named Routes
Posted by g. | Filed under Ruby on Rails, Technology
Here’s a quick one, but a useful reference nonetheless. How do you pass additional parameters to REST named routes?
Say you have the following route from the restful_authentication plugin:
map.logout ‘/logout’, :controller => ’sessions’, :action => ‘destroy’
This enables you to say something like this:
redirect_to logout_url
And if you want to pass extra params to that URL? It’s as [...]
Tags: named routes, parameters, params, rails, REST
Using Find Conditions on ActiveResource Objects
Posted by g. | Filed under Ruby on Rails
If you have a Rails app (app #1) which needs to communicate with another Rails app (app #2), chances are that app #2 is set up as a Web Service, and its controllers are RESTful, and that in app #1 you’re using ActiveResource. In case you’re not familiar with ActiveResource, please check out this excellent [...]
Tags: ActiveRecord, ActiveResource, rails, REST, Web Service