Forum: Ruby on Rails How is this done with REST (blinksale account)?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1df9fc8ddf084661265bbae74a8d0b43?d=identicon&s=25 jko170 (Guest)
on 2007-03-17 11:21
(Received via mailing list)
In Blinksale, the settings link in the top right takes you to the /
account url. From there, the side nav takes you to /account;templates /
account;reminders , etc.
>From what I've read, ;templates and ;reminders are custom rest actions
for a given resource. But the controller (account) does not appear to
be of rest nature. Also, when creating a new account, the url is /
firms/new . When in /account controller it is also accessing the Firm
Anyone know what I'm getting wrong here? Thanks.
1df9fc8ddf084661265bbae74a8d0b43?d=identicon&s=25 jko170 (Guest)
on 2007-03-18 20:26
(Received via mailing list)
C4dc94c893471878a105761a9207f29b?d=identicon&s=25 Zack Chandler (Guest)
on 2007-03-19 06:19
(Received via mailing list)
It is very likely that when you see a route that looks like
account;templates that the app is exposing "templates" as a RESTful
custom collection action:

map.resources :account, :collection => { :templates => :any }

It's sounds like with Blinksale the Firm model is an account that the
Blinksale customer signs up for and the Account model is the firm's
clients.  If this is correct then their routing scheme makes sense.
When you signup for an account with Blinksale you are creating a firm
with the route: firm/new.  This is RESTful too so I don't think you
are getting anything wrong here...

Zack Chandler
1df9fc8ddf084661265bbae74a8d0b43?d=identicon&s=25 jko170 (Guest)
on 2007-03-19 19:22
(Received via mailing list)
Thank you for your reply. Isn't collection a collections of resources/
objects? It looks like to me that all those templates when submitted
are issuing the http verb of put, which is updating one Firm object.
Also, when you go to change your plan here is the url:;change_pl...
So it appears to me that its kind of like a masking effect. /
account;template is a mask for /firms/50329;template  which makes
sense because their users don't need to see the latter url. If all of
this is the case, how would one create that url scheme in the routes
file? I remember I tried something like this but it didn't work:

map.resources :accounts, :member => {:contact_info => :put,
=> :put }

map.account '/account', :controller => 'accounts'

I thought this might generate /account;contact_info
This topic is locked and can not be replied to.