Newest version of Rails.
I have a table Positions that contains several columns, but the one in question is 'status'. This is a string based column that holds values 'Add' 'Error' 'Drop'. I have the table rendering in a view and wish to create links that will filter the data returned in the table, limited by status.
Add | Error ID | Name | Status 1 Bob Add 2 Jim Error
If I clicked the Add link above the table in the view it will change the data in the table to only show Bob, since he has a status of Add. If I clicked Error link it will only display Jim.
I can currently limit the view data with
@positions = Position.where(:status => "Add")
but I want to invoke this limit upon link click.
Thanks for the help and if I need to define further please let me know.