Commit 1d2e58a19fa3321f0794e034a983522288d4655b
1 parent
3a7a8c94
Exists in
master
Adapt entities extension to the new api path
Showing
1 changed file
with
14 additions
and
16 deletions
Show diff stats
lib/ext/entities.rb
1 | -require File.join(Rails.root,'lib','noosfero','api','entities') | |
1 | +require_dependency 'api/entities' | |
2 | 2 | |
3 | -module Noosfero | |
4 | - module API | |
5 | - module Entities | |
3 | +module Api | |
4 | + module Entities | |
6 | 5 | |
7 | - class Person < Profile | |
8 | - expose :orientacao_sexual, :identidade_genero, :transgenero, :etnia, :membro_conselho | |
6 | + class Person < Profile | |
7 | + expose :orientacao_sexual, :identidade_genero, :transgenero, :etnia, :membro_conselho | |
9 | 8 | |
10 | - expose :points do |person, options| | |
11 | - person.points if person.environment.plugin_enabled?('GamificationPlugin') | |
12 | - end | |
13 | - | |
14 | - expose :level do |person, options| | |
15 | - person.level if person.environment.plugin_enabled?('GamificationPlugin') | |
16 | - end | |
9 | + expose :points do |person, options| | |
10 | + person.points if person.environment.plugin_enabled?('GamificationPlugin') | |
11 | + end | |
17 | 12 | |
18 | - expose :gamification_plugin_level_percent do |person, options| | |
19 | - person.gamification_plugin_level_percent if person.environment.plugin_enabled?('GamificationPlugin') | |
20 | - end | |
13 | + expose :level do |person, options| | |
14 | + person.level if person.environment.plugin_enabled?('GamificationPlugin') | |
15 | + end | |
21 | 16 | |
17 | + expose :gamification_plugin_level_percent do |person, options| | |
18 | + person.gamification_plugin_level_percent if person.environment.plugin_enabled?('GamificationPlugin') | |
22 | 19 | end |
23 | 20 | |
24 | 21 | end |
22 | + | |
25 | 23 | end |
26 | 24 | end |
27 | 25 | ... | ... |