-
-
Save aliakhtar/e4705c113041cf14d1f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if restaurant.nil? | |
restaurant = Restaurant.create({account: self, name: name, catering_hours: [12]}) | |
restaurant.emails.create({name: 'General', email: email }) | |
else | |
puts "Updating restaurant: #{restaurant}, #{restaurant.nil?}" | |
restaurant.update_attribute(:name, name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment