I've got an artist form. In this form I've got attributes that do not
exist in the model that the form belongs to. However, I would like to
submit these values for later processing.
My virtual attributes in the form are:
<%= f.label :foobar %>
<%= f.text_field :foobar %>
In the artist model, I created a getter:
When the form is submitted, I am able to access the value of the
virtual attribute by doing, for example: puts params[:artist][:foobar]
in the controller (in the create method):
@artist = Artist.new(params[:artist])
# return the value of the virtual attribute
I would like to do the same thing in the model? How can foobar be
accessed in the model? Or is this not possible?