now i click on publish
Friday, August 16, 2013
Monday, March 15, 2010
Many-to-Many Relationship in Rails
Many-to-Many relationships in Rails come in 2 flavors.
- has_and_belongs_to_many -> for bare-bones join table
- has_many :through -> for full join models when there is some data associated with the relationship that you want to keep track of
Facebook Login using facebooker
In application_controller.rb
include FacebookerAuthentication::Controller
ensure_authenticated_to_facebook
before_filter :facebook_login_required
include FacebookerAuthentication::Controller
ensure_authenticated_to_facebook
before_filter :facebook_login_required
check_box_tag() vs check_box()
check_box is for use with a model object.
check_box_tag is when it is not tied with any model and just need a plain checkbox.
check_box_tag is when it is not tied with any model and just need a plain checkbox.
Sunday, March 14, 2010
Facbook Canvas : Checkbox
fb:editor-custom
input type="checkbox" style="width:auto;" name="checker" unchecked />March 20
input type="checkbox" style="width:auto;" name="checker" unchecked />March 21
input type="checkbox" style="width:auto;" name="checker" unchecked />March 27
input type="checkbox" style="width:auto;" name="checker" unchecked />March 28
input type="checkbox" style="width:auto;" name="checker" unchecked />April 3
input type="checkbox" style="width:auto;" name="checker" unchecked />April 4
/fb:editor-custom
input type="checkbox" style="width:auto;" name="checker" unchecked />March 20
input type="checkbox" style="width:auto;" name="checker" unchecked />March 21
input type="checkbox" style="width:auto;" name="checker" unchecked />March 27
input type="checkbox" style="width:auto;" name="checker" unchecked />March 28
input type="checkbox" style="width:auto;" name="checker" unchecked />April 3
input type="checkbox" style="width:auto;" name="checker" unchecked />April 4
/fb:editor-custom
Facebook Form : Input text - Select from facebook Friends
<%=fb_friend_selector()%>
---------------------------
Note that in your controller, the only thing you will have to do differnt is fish out the facebook params as they are not part of your model, from the freind selector you can get:
friend_name = params[:friend_selector_name]
friend_id = params[:friend_selector_id]
Subscribe to:
Posts (Atom)