search for: orderuser

Displaying 3 results from an estimated 3 matches for "orderuser".

Did you mean: order_user
2007 Nov 20
2
confirming that a model instance was correctly created from POST params
...fact setting a new attribute on a model. Substruct''s (http://dev.subimage.com/projects/substruct) OrderHelper contains this method: 1 def create_order_from_post 2 @use_separate_shipping_address = params[:use_separate_shipping_address] 3 4 @order_user = OrderUser.find_or_create_by_email_address( 5 params[:order_user][:email_address] 6 ) 7 @order_user.valid? 8 9 @order = Order.new(params[:order]) 10 @order.valid? 11 12 # Look up billing address and update if customer is logged in. 1...
2009 Jan 15
4
HABTM and Check Boxes (Yet Another thread on this)....
...ubstruct plugin version, wich stays in the plugin/vendor version. the category.rb stays in the myapp/app/models , while the order_user.rb stays in myapp/vendor/plugins/substruct/app/models . this is my models class Category < ActiveRecord::Base has_and_belongs_to_many :order_users end class OrderUser < ActiveRecord::Base include CheckboxSelectable has_and_belongs_to_many :categories #many other things down below end this are my controller def updateCust @customer = OrderUser.find(params[:id]) @customer.update_attributes(params[:customer]) @customer.update_check...
2006 Jun 01
4
how can I control when to commit a transaction?
hello it seems like this question has appeared a few times with no answer: how do you get rails to issue ''write'' statements (ie ''CREATE/UPDATE'') to the database without committing each time? I tried setting ActiveRecord::Base.connection.begin_db_transaction before calling any action on my object, but as soon as myObject.save or myObject.update is called,