daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # POST /ideas
  2.   def create
  3.     @idea = Idea.new(params[:idea])
  4.  
  5.     respond_to do |format|
  6.       if @idea.save
  7.         flash[:notice] = 'Idea was successfully created.'
  8.         format.html { redirect_to(ideas_url) }
  9.         format.js   { render :json => {:object => "idea", :success => true}}
  10.       else
  11.         format.html { render :action => "new" }
  12.         format.js   { render :json => {:object => "idea", :errors => @idea.errors, :success => false}}
  13.       end
  14.     end
  15.   end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top