On Mar 6, 12:09 pm, Jamal S. firstname.lastname@example.org
should I also use .htaccess, or I can use the category controller to
handle all the actions in one method (index) ?
In Rails you use the routes.rb file to map incoming URLs to your
controllers and actions.
map.connect '/category/:filter/, :controller => ‘categories’, :action
In your CategoriesController class, you can now inspect
params[:filter] to see what (if anything) was specified:
class CatagoriesController < ApplicationController
@items = Item.find_all_by_type(params[:filter)]
@items = Item.find :all
and then your index.rhtml can display the @items array.