Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## post model
- after_commit :share_all
- def share_all
- user.share_content title, content
- end
- ## user model
- def share_content title, content
- # whatever stuff you have to determine whether it's a twitter and/or facebook update...
- if go_for_twitter
- twitter.update title
- end
- if go_for_facebook
- facebook.feed! :message => title
- # ...etc.
- end
- end
Add Comment
Please, Sign In to add comment