Skip to content

Instantly share code, notes, and snippets.

@garybernhardt
Forked from dasch/gist:1585086
Created January 9, 2012 21:39
Show Gist options
  • Save garybernhardt/1585088 to your computer and use it in GitHub Desktop.
Save garybernhardt/1585088 to your computer and use it in GitHub Desktop.
# 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