User Profile

Collapse

Profile Sidebar

Collapse
burttonboarder
burttonboarder
Last Activity: Jan 22 '08, 11:47 AM
Joined: Nov 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Don't save the parent record if the child record fails

    I'm working on a rails project where I have a table called people and a table called addresses.

    Each person can have many addresses. I've created a form which includes fields from both the People table and the Addresses table, and should create a new record in both tables upon successful submission. The problem that I'm having is that if the User record passes validation the address record does not, the user record still gets saved....
    See more | Go to post

  • _before_type_cast error with validates_numericality_of

    I'm new to Rails, and so far I love it, but I'm having a problem. I have a phone_numbers table that has a number field, which holds the phone number for that record. I have also written a view which has three fields in it: area_code, prefix, and suffix. None of these fields exist in the phone_numbers table, but I wanted to break them up in the view so that I could have each one be an individual text field. In the phone_numbers model I have defined...
    See more | Go to post
No activity results to display
Show More
Working...