lib/popular/popular.rb in popular-0.6.0 vs lib/popular/popular.rb in popular-0.7.0
- old
+ new
@@ -1,6 +1,7 @@
module Popular
+
# Namespace for methods included in popular models
module Popular
extend ActiveSupport::Concern
@@ -143,16 +144,19 @@
friends.include? popular_model
end
# ClassMethods included in popular models
module ClassMethods
+ attr_accessor :friendship_profile
# after_unfriend callback convenience class method
+ # Fired after a popular_model unfriends another popular_model
#
# @example
#
# class User < ActiveRecord::Base
+ # popular
# after_unfriend :do_something_amazing
#
# def do_something_amazing
# puts name
# end
@@ -166,14 +170,16 @@
def after_unfriend *args, &blk
set_callback :unfriend, :after, *args, &blk
end
# before_unfriend callback convenience class method
+ # Fired before a popular_model unfriends another popular_model
#
# @example
#
# class User < ActiveRecord::Base
+ # popular
# before_unfriend :do_something_amazing
#
# def do_something_amazing
# puts name
# end
@@ -187,14 +193,16 @@
def before_unfriend *args, &blk
set_callback :unfriend, :before, *args, &blk
end
# before_befriend callback convenience class method
+ # Fired before a popular model befriends another popular_model
#
# @example
#
# class User < ActiveRecord::Base
+ # popular
# before_befriend :do_something_amazing
#
# def do_something_amazing
# puts name
# end
@@ -207,13 +215,15 @@
def before_befriend *args, &blk
set_callback :befriend, :before, *args, &blk
end
# after_befriend callback convenience class method
+ # Fired after a popular_model befriends another popular_model
#
# @example
#
# class User < ActiveRecord::Base
+ # popular
# after_befriend :do_something_amazing
#
# def do_something_amazing
# puts name
# end