Re: [Rails] link_to parameters

2011-10-06 Thread Walter Lee Davis
On Oct 5, 2011, at 3:48 PM, Walter Lee Davis wrote: > I'm trying to add paging parameters to link_to inside an application_helper > method. > > def index_show_link(elm, link_text = 'Show') >(can?(:read, elm)) ? link_to( link_text, elm ) : ' '.html_safe > end > > I want to add the :page =

[Rails] link_to parameters

2011-10-05 Thread Walter Lee Davis
I'm trying to add paging parameters to link_to inside an application_helper method. def index_show_link(elm, link_text = 'Show') (can?(:read, elm)) ? link_to( link_text, elm ) : ' '.html_safe end I want to add the :page => params[:page] pair into the link, but I can't seem to find a wa

[Rails] Link_to parameters

2011-01-05 Thread David Zhu
Hello, I would like to have a link_to automatically populate a field in the form that it is linking to. For example (excuse my silly words, im trying to make a point) <%= link_to "Add a COOL Post", new_post_path, :howcoolisit => 'COOL' %> <%= link_to "Add a NOTCOOL Post", new_post_path, :howcooli