Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- named_scope :stats_greater_than, lambda { |value|
- { :select => "char.*, SUM(char_stats.base_stat) total_stats",
- :joins => :char_stats,
- :conditions => ["total_stats >= ?", value],
- :group => "char.id" }
- }
Add Comment
Please, Sign In to add comment