Hi,

Still learning rails and have a basic question.  Can I pass any variable
thru the params hash to an action?

eg   "in_progress"

View:
<%= f.submit "Add image/video",  :in_progress=> "true" %>

Controller:
def update
    @question = Question.find(params[:id])

    if params[:in_progress] == "true"
      @question.attributes = params[:question]
      if @question.save(:validate => false)
        redirect_to gallery_path(session[:minisection_id]), id:
"image_gallery"
      end
    else....

Im trying to set flag to bypass validation and redirect in update
action.

Thanks

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to