diff --git a/vendor/plugins/vote_fu/examples/voteable.rb b/vendor/plugins/vote_fu/examples/voteable.rb index 60e09db..96bd239 100644 --- a/vendor/plugins/vote_fu/examples/voteable.rb +++ b/vendor/plugins/vote_fu/examples/voteable.rb @@ -4,7 +4,7 @@ class Voteable < ActiveRecord::Base acts_as_voteable - named_scope :descending, :order => "created_at DESC" + scope :descending, :order => "created_at DESC" end \ No newline at end of file diff --git a/vendor/plugins/vote_fu/lib/models/vote.rb b/vendor/plugins/vote_fu/lib/models/vote.rb index fa7871b..b303dec 100644 --- a/vendor/plugins/vote_fu/lib/models/vote.rb +++ b/vendor/plugins/vote_fu/lib/models/vote.rb @@ -1,9 +1,9 @@ class Vote < ActiveRecord::Base - named_scope :for_voter, lambda { |*args| {:conditions => ["voter_id = ? AND voter_type = ?", args.first.id, args.first.class.base_class.name]} } - named_scope :for_voteable, lambda { |*args| {:conditions => ["voteable_id = ? AND voteable_type = ?", args.first.id, args.first.class.base_class.name]} } - named_scope :recent, lambda { |*args| {:conditions => ["created_at > ?", (args.first || 2.weeks.ago).to_s(:db)]} } - named_scope :descending, :order => "created_at DESC" + scope :for_voter, lambda { |*args| {:conditions => ["voter_id = ? AND voter_type = ?", args.first.id, args.first.class.base_class.name]} } + scope :for_voteable, lambda { |*args| {:conditions => ["voteable_id = ? AND voteable_type = ?", args.first.id, args.first.class.base_class.name]} } + scope :recent, lambda { |*args| {:conditions => ["created_at > ?", (args.first || 2.weeks.ago).to_s(:db)]} } + scope :descending, :order => "created_at DESC" # NOTE: Votes belong to the "voteable" interface, and also to voters belongs_to :voteable, :polymorphic => true diff --git a/vendor/plugins/vote_fu/lib/vote_fu.rb b/vendor/plugins/vote_fu/lib/vote_fu.rb index 1900192..68849af 100644 --- a/vendor/plugins/vote_fu/lib/vote_fu.rb +++ b/vendor/plugins/vote_fu/lib/vote_fu.rb @@ -6,4 +6,4 @@ require 'models/vote.rb' ActiveRecord::Base.send(:include, Juixe::Acts::Voteable) ActiveRecord::Base.send(:include, PeteOnRails::Acts::Voter) ActiveRecord::Base.send(:include, PeteOnRails::VoteFu::Karma) -RAILS_DEFAULT_LOGGER.info "** vote_fu: initialized properly." +Rails.logger.info "** vote_fu: initialized properly." -- libgit2 0.21.2