-
-
Save garybernhardt/1585088 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
# Rails controller | |
def create | |
@profile = ProfileManager.create(params[:profile]) | |
rescue ProfileManager::CreationFailed => e | |
render :new, :errors => e.errors | |
end | |
# Raptor route | |
create :to => "ProfileManager#create", ProfileManager::CreationFailed => render(:new) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment