Created
April 4, 2015 03:40
-
-
Save bntzio/246c14908a65a74ca8a4 to your computer and use it in GitHub Desktop.
this one test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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