title: Rails: How to store form params in a non-active record model?
body: <p>I want to do store the parameters from a form in a model. Since I don't want the model to use any database, it does not inherit from ActiveRecord::Base. I'm thinking it should look something like this:</p>
  
  <pre><code># in view:
  &lt;% form_for :question, :url =&gt; {:action =&gt; "ask"} do |f| %&gt;
    &lt;%= f.text_field(:q) %&gt;
    &lt;%= submit_tag %&gt;
  &lt;% end %&gt;
  
  # in controller:
  def ask
    # I want this to magically set all variables in @question using 
    # values from params.
    @question = params[:question]
  end
  
  # in model:
  class Question
    attr_accessor :q
  
    def initialize
      @q = ""
    end
  end
  </code></pre>
  
  <p>But after spending 1½ days on it, it doesn't seem to be the right way to do it. Any suggestions would be much appreciated.</p>