Displaying 2 results from an estimated 2 matches for "add_invoice".
2006 Jun 08
0
RE: Rails Digest, Vol 21, Issue 160
...t;
> I have a table called ''accounts'' to which I want to add
> invoices (an account can have many invoices). I have the two
> models (accounts and
> invoices) all set up.
>
> On the account web page, I have a button_to link to an action
> called ''add_invoice''. I added a def for ''add_invoice'' in
> account.rb, but I can''t figure out what to put inside the
> def. Is another controller needed (invoice.rb)? Can I do it
> from within account.rb?
>
> I''m trying to wrap my head around this concept...
2006 Jun 05
5
adding habtm through migrations
Hello,
I''m stuck, I''ve got a model Product and would like to add a new model
called Category. Furthermore, I want to set up a many2many
relationship between the mentioned models. the problem is that I do
not know how to set the primary key in the categories_products table.
this is what I''ve got in my migration file:
create_table :categories do |t|
t.column :name,