O'Reilly logo

Rhomobile Beginner's Guide by Abhishek Nalwaya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action Filtering record by company and gender

We will create a page that will allow us to filter all the records based on company and gender, and then use the find command to show the filtered results on the next page.

We will follow these steps to create the page:

  1. Create a link for filter page on the home page i.e. index.erb in the app folder:
    <li>
    <a href="<%= url_for :controller => :Employee, :action => :filter_employee_form %>"><span class="title"> Filter Employee </span><span class="disclosure_indicator"/></a>
    </li>
    
    Time for action Filtering record by company and gender
  2. We can see in the screenshot that a Filter Employee link is created on the home page.
  3. Create an action filter_employee_form ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required