Thanks - that's great information to know too.
I've basically been working heavily on "one" controller and model to
fine-tune it exactly the way it needs to work. It has a lot of methods
and control functionality associated with it. I'm close to finishing
the default MVC and so I'm trying to perform some cleanup work in
preparation for the other MVC templates.
With regards to the 37 MVC templates that are similar:
The controllers will be exact:
The views will be exact (minus table columns (some will have more some
less)
The models will be almost exact with some shared methods..
I've already moved the shared methods from the models to the new plugin
I created and tested (all appears well).
I've cleaned up a lot of the views by creating a table_helper that
defines pagination, sorting, etc.
However, the controllers are my next step.
I never thought about a generic controller option. So, let me make sure
I understand you correctly:
My controllers are restful. Each of them houses the exact same items,
including the index:
def index
validate_date_form
@rushing_offenses = RushingOffense.list(params[:search],
params[:page], params[:orderby], params[:sortby], params[:numteams],
params[:compiled_on])
@showall = params[:numteams]
@searchteams = params[:search]
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @rushing_offenses }
end
end
The only differences per each controller are the instance variables.
So, how are instanced variables handled between generic/project based
controllers?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---