Skip to content

Instantly share code, notes, and snippets.

@austinbv
Created September 19, 2011 04:32
Show Gist options
  • Save austinbv/1225962 to your computer and use it in GitHub Desktop.
Save austinbv/1225962 to your computer and use it in GitHub Desktop.
(rdb:33) params[:shape]
{"type"=>"squiggle", "points"=>{"0"=>{"x"=>"252", "y"=>"336"}, "1"=>{"x"=>"252", "y"=>"335"}, "2"=>{"x"=>"252", "y"=>"325"}, "3"=>{"x"=>"252", "y"=>"309"}, "4"=>{"x"=>"252", "y"=>"289"}, "5"=>{"x"=>"252", "y"=>"267"}, "6"=>{"x"=>"257", "y"=>"251"}, "7"=>{"x"=>"265", "y"=>"236"}, "8"=>{"x"=>"276", "y"=>"228"}, "9"=>{"x"=>"284", "y"=>"225"}, "10"=>{"x"=>"294", "y"=>"222"}, "11"=>{"x"=>"303", "y"=>"222"}, "12"=>{"x"=>"312", "y"=>"223"}, "13"=>{"x"=>"318", "y"=>"226"}}, "stroke_width"=>"1"}
(rdb:33) params[:shape][:type]
"squiggle"
(rdb:33) Shape.create(params[:shape])
#<Shape id: 4, slide_id: nil, type: nil, stroke_width: 1, stroke_color: nil, fill_color: nil, height: nil, width: nil, radius: nil, created_at: "2011-09-19 04:30:44", updated_at: "2011-09-19 04:30:44", points: 1>
(rdb:33)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment