Sending parameters from view to method in controller

this my show method
def showa
@posts=Post.find(:all, :conditions => “title LIKE ‘a%’”, :order=>
“id DESC”)
render :action => ‘list’
end

This is my view stmt

<%= link_to ‘A’, :action => ‘showa’ %>

I want to send A as parameter or any alphabet. This to view my posts in
alphabetical order of there titles.

Thank You.

In View:
<%= link_to “A”, :action => “show”, :letter => ‘a’ %>

In Controller:
letter = params[:letter]

HTH

  • H

On 5/23/07, Ravindraraj M. [email protected]
wrote:

<%= link_to ‘A’, :action => ‘showa’ %>


Husein C.,
CEO, CTO
Yucca Intelligence Development
http://www.YuccaHQ.com

We make the web a better place!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs