Skip to content

Instantly share code, notes, and snippets.

@jheg
Created March 24, 2015 21:35
Show Gist options
  • Save jheg/27d055372b579330b259 to your computer and use it in GitHub Desktop.
Save jheg/27d055372b579330b259 to your computer and use it in GitHub Desktop.
rails
def create
<<<<<<< HEAD
@bookmark = Bookmark.new(bookmark_params)
@bookmark.save
flash[:notice] = "Bookmark added!"
redirect_to root_path
=======
@bookmark = Bookmark.new(params[:create])
if @bookmark.save
# render text: "Thanks for sending a GET request with cURL! #{request.body.read}"
render json: params[:title]
end
>>>>>>> 250be2eb376f47c47dd543843a200947ad81846c
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment