Add save! to raise exception if things go wrong#19
Add save! to raise exception if things go wrong#19leomayleomay wants to merge 34 commits intorailsgsoc:masterfrom
Conversation
lib/active_form/base.rb
Outdated
There was a problem hiding this comment.
@kirs is right in the syntax. But overall this is a no go for me because we're not targeting Active Record as the Rails integration point, but Active Model.
A record invalid or form invalid error using the Active Form namespace would be fine for me.
Kasper
Den 25/11/2014 kl. 22.17 skrev Kir Shatrov notifications@github.com:
In lib/active_form/base.rb:
@@ -42,6 +42,10 @@ def save
end
end
- def save!
AFAIK || syntax if prefered over orsave or raise ActiveRecord::RecordInvalid.new(self)—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
we're not targeting Active Record as the Rails integration point, but Active Model.
A record invalid or form invalid error using the Active Form namespace would be fine for me.
Good point, I totally agree.
|
I'll be happy to merge it right after #18 |
This reverts commit 6275c7b.
No description provided.