Skip to content

Instantly share code, notes, and snippets.

@queso
Created January 6, 2010 19:09
Show Gist options
  • Save queso/270536 to your computer and use it in GitHub Desktop.
Save queso/270536 to your computer and use it in GitHub Desktop.
def update
@saving =Saving.find(params[:id])
respond_to do |wants|
if @saving.use! # state_machine transition method
wants.html { redirect_to savings_url }
else
wants.html { render :action => :edit }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment