I´m adding numbers to a database from fields in a form, but I want to
include some information I have in a variable not generated in this
The variable user.company exists in the same class as create(), and I
want to include the value of this variable when I add new numbers to
The form looks like this:
<%= text_field 'number', 'number' %>
<%= text_field 'number', 'name' %>
@number = Number.new(params[:number])
How can I make “create” include the value of user.company or $company?
This should be put in the “company” field of the Numbers database.
Numbers contains the following fields: id, number, name, email, list,
Rails mailing list