From 1d2e58a19fa3321f0794e034a983522288d4655b Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Tue, 17 May 2016 13:41:51 -0300 Subject: [PATCH] Adapt entities extension to the new api path --- lib/ext/entities.rb | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lib/ext/entities.rb b/lib/ext/entities.rb index 5f5ee29..c50231b 100644 --- a/lib/ext/entities.rb +++ b/lib/ext/entities.rb @@ -1,27 +1,25 @@ -require File.join(Rails.root,'lib','noosfero','api','entities') +require_dependency 'api/entities' -module Noosfero - module API - module Entities +module Api + module Entities - class Person < Profile - expose :orientacao_sexual, :identidade_genero, :transgenero, :etnia, :membro_conselho + class Person < Profile + expose :orientacao_sexual, :identidade_genero, :transgenero, :etnia, :membro_conselho - expose :points do |person, options| - person.points if person.environment.plugin_enabled?('GamificationPlugin') - end - - expose :level do |person, options| - person.level if person.environment.plugin_enabled?('GamificationPlugin') - end + expose :points do |person, options| + person.points if person.environment.plugin_enabled?('GamificationPlugin') + end - expose :gamification_plugin_level_percent do |person, options| - person.gamification_plugin_level_percent if person.environment.plugin_enabled?('GamificationPlugin') - end + expose :level do |person, options| + person.level if person.environment.plugin_enabled?('GamificationPlugin') + end + expose :gamification_plugin_level_percent do |person, options| + person.gamification_plugin_level_percent if person.environment.plugin_enabled?('GamificationPlugin') end end + end end -- libgit2 0.21.2