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’

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]


  • H

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

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

Husein C.,
Yucca Intelligence Development

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