Displaying 1 result from an estimated 1 matches for "lookupscontroller".
Did you mean:
lookupcontroller
2008 Jul 29
0
handling multiple lookup tables in rails
...how to do this sort of thing cleanly?
Below is the code I''m playing around with....
thanks
in routes I''ve got
# lookups/CollectionType/lookups
#lookups/Gender/lookups
map.resources :lookups, :path_prefix => ''lookups/:mdl''
ex Lookup Controller
class LookupsController < ApplicationController
# GET /lookup
# GET /lookup.xml
before_filter :setup_tables
def index
@lookups = @theModel.find(:all)
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @lookups }
end
end
# GET /lookup/1
# GET /looku...