search for: create_festival

Displaying 1 result from an estimated 1 matches for "create_festival".

2006 Jun 15
0
Re: rails question
...e a little more precise information about how this is used in code? What I would like is to have the controller method bump back to the previous view just like it does with regular validation. I tried something like this in my controller: (The festival model validates_presence_of :name ) def create_festival @festival = Festival.new if request.post? @festival.attributes = params[:festival] # sending in only the name at this point... if !(@festival.errors.invalid? :name ) # => true if name is invalid @festival.save_with_validation(false) @flash[:success] = "Y...