Skip to content

Instantly share code, notes, and snippets.

@seanstickle
Forked from Yax/gist:117162
Created May 24, 2009 16:21
Show Gist options
  • Select an option

  • Save seanstickle/117173 to your computer and use it in GitHub Desktop.

Select an option

Save seanstickle/117173 to your computer and use it in GitHub Desktop.
def create
@ticket = Ticket.new(params[:ticket])
flash[:notice] = "Ticket created."
redirect_to(@ticket)
end
def validate
errors.add("No such category") unless self.category
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment