Skip to content

Instantly share code, notes, and snippets.

@bntzio
Created April 4, 2015 03:40
Show Gist options
  • Save bntzio/246c14908a65a74ca8a4 to your computer and use it in GitHub Desktop.
Save bntzio/246c14908a65a74ca8a4 to your computer and use it in GitHub Desktop.
this one test
def create
puts "INCOMING PARAMS HERE: #{params}"
sender = params['sender']
subject = params['subject']
body = params['stripped-text']
@user = User.find_by_email(sender)
@bookmark = @user.bookmarks.new(url: body)
@bookmark.save!
puts @bookmark.url
# @user = User.find_by(email: params[:sender])
# @topic = Topic.create(title: params[:subject], user_id: @user.id)
# @url = params["body-plain"]
# @bookmark = Bookmark.create(url: @url, topic_id: @topic.id)
# puts "#{@user}, #{@topic}, #{@url}"
head 200
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment