Created
December 22, 2011 22:41
-
-
Save ptagell/1512172 to your computer and use it in GitHub Desktop.
Update using dirty
This file contains hidden or 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
def update | |
if @baby.update_attributes(params[:baby]) | |
if baby.notify.changed? | |
flash[:notice] = "Done" | |
else | |
redirect_to(root_url(:host => with_subdomain(@baby.subdomain)), :notice => 'Your baby was successfully updated and everyone has been told the good news.') | |
end | |
else | |
render :action => "edit" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment