Created
April 19, 2013 07:55
-
-
Save victorcreed/5418811 to your computer and use it in GitHub Desktop.
dont know
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%w(buy rent).each do |a| | |
define_method "user_#{a}_movies" do | |
instance_variable_get(:"@#{a}_movies").blank? ? instance_variable_set( :"@#{a}_movies", PublicActivity::Activity.where(owner_id: User.current.id, owner_type: "User", key: "video.#{a}")) : instance_variable_get(:"@#{a}_movies") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment