I think I finally got this to work but wouldn''t mind some confirmation
that this is the right and RESTFUL way.
map.resources :positions, :collection => {:member => :get}
controller:
def description
@position = Position.find(params[:id])
respond_to do |format|
format.html
format.xml {render :xml => @position.to_xml }
end
end
link:
<%= link_to "Preview Description", :controller =>
''positions'', :action
=> ''description'', :id => @position.id %>
This make sense and any potential issues ?
TIA
Stuart
On 10/2/06, Dark Ambient
<sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I am trying to figure how to break up a Get into 2 seperate views.
> Scenario, user goes to index page and sees list of their posts with
> links to show, edit, destroy.
> Cool and working well.
> However in the show portion there is not enough room to display all
> the information. So in the show.rhtml page I have 90% of the
> information, then I want to put a link at the bottom to take them to
> the rest of the post information. Not sure how to do this restful
> proper.
> TIA
> Stuart
>
> --
> http://en.wikipedia.org/wiki/Dark_ambient
>
--
http://en.wikipedia.org/wiki/Dark_ambient
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---