Commit 2c72ee65bffc491f9225c5331535132f18f3a400
1 parent
1f192ed4
Exists in
master
and in
1 other branch
Small fixes for rails4
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
models/gamification_plugin/points_categorization.rb
1 | -class GamificationPlugin::PointsCategorization < Noosfero::Plugin::ActiveRecord | |
1 | +class GamificationPlugin::PointsCategorization < ActiveRecord::Base | |
2 | 2 | belongs_to :profile |
3 | 3 | belongs_to :point_type, class_name: 'GamificationPlugin::PointsType', foreign_key: :point_type_id |
4 | 4 | attr_accessible :profile_id, :profile, :point_type_id, :weight |
... | ... | @@ -10,5 +10,5 @@ class GamificationPlugin::PointsCategorization < Noosfero::Plugin::ActiveRecord |
10 | 10 | scope :for_type, lambda { |p_type| joins(:point_type).where(gamification_plugin_points_types: {name: p_type}) } |
11 | 11 | scope :for_profile, lambda { |p_profile| joins(:profile).where(profiles: {identifier: p_profile}) } |
12 | 12 | |
13 | - scope :grouped_profiles, select(:profile_id).group(:profile_id).includes(:profile) | |
13 | + scope :grouped_profiles, -> { select(:profile_id).group(:profile_id).includes(:profile) } | |
14 | 14 | end | ... | ... |
models/gamification_plugin/points_type.rb