Advertisement
theminijohn

Untitled

Sep 15th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.42 KB | None | 0 0
  1. def create
  2.         binding.pry
  3.         @clip = current_user.clips.build(clip_params)
  4.  
  5.         respond_to do |format|
  6.             if @clip.save
  7.                 format.html { redirect_to @clip, notice: 'Clip was successfully created.' }
  8.                 format.json { render action: 'show', status: :created, location: @clip }
  9.             else
  10.                 format.html { render action: 'new' }
  11.                 format.json { render json: @clip.errors, status: :unprocessable_entity }
  12.             end
  13.         end
  14.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement