diff --git a/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb b/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb index 9888679..990a28b 100644 --- a/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb +++ b/plugins/mezuro/controllers/mezuro_plugin_profile_controller.rb @@ -2,10 +2,10 @@ class MezuroPluginProfileController < ProfileController append_view_path File.join(File.dirname(__FILE__) + '/../views') - def metrics + def module_result project_content = profile.articles.find(params[:id]) - module_name = params[:module_name] - render :partial => 'content_viewer/module_result', :locals => { :module_result => project_content.module_result(module_name) } + module_result = project_content.module_result(params[:module_name]) + render :partial => 'content_viewer/module_result', :locals => { :module_result => module_result} end def autoreload diff --git a/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb b/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb index 47622f0..cafd637 100644 --- a/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb +++ b/plugins/mezuro/test/functional/mezuro_plugin_profile_controller_test.rb @@ -1,11 +1,11 @@ require 'test_helper' -class MezuroPluginProfileControllerTest < ActiveSupport::TestCase +class MezuroPluginProfileControllerTest < ActionController::TestCase def setup @controller = MezuroPluginProfileController.new @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new + @response = ActionController::TestResponse.new @profile = fast_create(Community) @profile_id = @profile.identifier end diff --git a/plugins/mezuro/views/content_viewer/_module_result.rhtml b/plugins/mezuro/views/content_viewer/_module_result.rhtml index 39f7657..cf4ec24 100644 --- a/plugins/mezuro/views/content_viewer/_module_result.rhtml +++ b/plugins/mezuro/views/content_viewer/_module_result.rhtml @@ -1,11 +1,11 @@ -
| Metric | @@ -17,11 +17,15 @@|||||
|---|---|---|---|---|---|
| <%= metric_result.metric.name %> | <%= metric_result.value %> | <%= metric_result.weight %> | -<%= range.label %> | + <% if range.nil? %> ++ <% else %> + | <%= range.label %> | + <% end %>