Topic: Passing params from form to Model
I would like to allow input from a form to be passed back to my model in order to be used in a complex db query.
The example I have uses attr_reader and attr_writer but gets a little complicated from there.
I am trying to get my input from my view into the self.db_query in my info model. Here is the code I have and was wondering if there was an easier way or if someone had a working example:
class Info < ActiveRecord::Base
@input = data
:order => "name",
:conditions => "name = 'INPUT FROM FORM SOMEHOW GOES HERE'"
Any help at all is greatly appreciated! Thanks...