Hello, every day i love more rails xD because after struggling a bit I
could finally install the Active Scaffold plugin and it works great with
this.
But now it is time to grow a little more on rails and am trying to make
an ordering system and products. Which on my system I have these 3
tables:
Product:
=> id_product
=> name
=> amount
=> prices
Request:
=> id_order
=> date_order
=> recipient
=> address
Detalles_pedido:
=> product_id
=> order_id
=> price_unity
=> amount
=> total
So you see, the Active Scaffold allows me to work on each table CRUD
apart, but now I need to create a form based on which prodcuts can
submit all of my store and that the user choose the amount of each and
then add address of the recipient and the date of order, fields that are
in the order table. But while I have to insert in "ORDER_DETAIL
''respective ids and the amount and the respective total for the order.
And since I have been finding out something about a method @ task = @
project.tasks.build (params [: task]) but does not help much, because
maybe you need now is an array to insert in "ORDER_DETAIL" and that it
could be done in php but not much beyond that domain and, lo conosco no
rails at all.
If rails is not an easier way to do this or if I can do all this with
the Active Scaffold, as I see all these respects the relationship and
insertions in different tables at once.
The truth''m a bit lost and I hope they can give me a hand that cat xD
no
idea where to start now!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.