title: Rails TypeError when passing a object
body: <p>I was creating a tableless model in Rails 4 for supporting sending emails easily.</p>
  
  <p>So i have the following model:</p>
  
  <pre><code>class Message
    include ActiveModel::Model
  
    attr_accessor :subject, :content, :email
  end
  </code></pre>
  
  <p>The following controller:</p>
  
  <pre><code>class MessagesController &lt; ApplicationController
    def new
      @message = Message.new
    end
  
   def create
     message = Message.new(params[:message])
     if message.valid?
       UserMailer.send(message)
       redirect_to :back, :notice =&gt; "Email was successfully sent."
     else
       flash[:alert] = "You must fill all fields."
       render 'new'
     end
   end
  end
  </code></pre>
  
  <p>The form:</p>
  
  <pre><code>&lt;%= form_for @message do |f| %&gt;
    &lt;%= f.label :email %&gt;
    &lt;%= f.text_field :email %&gt;
  
    &lt;%= f.label :subject %&gt;
    &lt;%= f.text_field :subject %&gt;
  
    &lt;%= f.label :content %&gt;
    &lt;%= f.text_area :content, rows: 5, class: 'span7' %&gt;
    &lt;%= f.submit "Send Email", class: 'btn btn-primary' %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>But when i try to send an email here i what i got:</p>
  
  <pre><code>#&lt;Message:0x007fcc98e8c760 @errors=#    &lt;ActiveModel::Errors:0x007fcc98e96788 @base=#&lt;Message:0x007fcc98e8c760 ...&gt;, @messages={}&gt;,     @email="sdsadas@adasdas.com", @subject="adasdas", @content="asdsad", @validation_context=nil&gt; is not a symbol
  </code></pre>
  
  <p>The error says its in here UserMailer.send(message)</p>
  
  <p>Can someone help me?</p>