search for: new_custom

Displaying 2 results from an estimated 2 matches for "new_custom".

Did you mean: cel_custom
2006 Mar 14
4
Two Customer Types - Best Design Principle?
...oblem here (besides the validation issue above). But, if the customer does have an existing record, is there an elegant way to "merge" the extended details from the form with the existing email address marked record on the database? Currently I have the code: form = params[:new_customer] email = form[:email] tmp_customer = Customer.find_by_email(email) if tmp_customer != nil && (tmp_customer.level == ''mailinglist'' || tmp_customer.level == ''test'') @customer = Customer.new(params[:new_customer])...
2005 Dec 22
0
Errors object missing when saving AR in Web Services method
...ror custom struct. But I cannot fill in this because unsaved object contain NO errors object, it just contains @new_record = true (and this indicates that it has not been saved). Here is the sample API method: <code> # Not all required attrs are provided since I want it to be invalid def new_customer(first_name) customer = Customer.new( :first_name => first_name ) customer.save customer end </code> Return value after invoking this method (through web services scaffold) shows this <code> #<Customer:0x367d680 @new_record=true, @attributes={"first_name"=>...