Create a ‘Like’ or ‘+1′ button with make_flaggable
Devchat.tv Episode Roundup
English - July 15, 2011 01:32 - 44 MB VideoHow To Education Business Careers programming javascript web framework development front end developer programmer internet node Homepage Download Apple Podcasts Google Podcasts Overcast Castro Pocket Casts RSS feed
Previous Episode: 010 RR Personal Design Rules
Next Episode: Investing in Your Knowledge Portfolio
With the recent release of the Google Plus beta (ask me for an invite if you want one), I felt it appropriate to show a simple way to create a Like or +1 button for your Rails application. The app and concept is pretty simple, so I won't worry about posting the code below.
Install:
gem 'make_flaggable', :git => 'git://github.com/cavneb/make_flaggable.git'
bundle install
rails generate make_flaggable
rake db:migrate
Models:
class Article < ActiveRecord::Base
make_flaggable :like
end
class User < ActiveRecord::Base
make_flagger
end
Links:
https://github.com/medihack/make_flaggable
https://github.com/cavneb/make_flaggable
Download 93.4 MB
Download (iPod & iPhone) 43.9 MB