diff --git a/plugins/mezuro/controllers/profile/mezuro_plugin_profile_controller.rb b/plugins/mezuro/controllers/profile/mezuro_plugin_profile_controller.rb index 721462a..4bf0424 100644 --- a/plugins/mezuro/controllers/profile/mezuro_plugin_profile_controller.rb +++ b/plugins/mezuro/controllers/profile/mezuro_plugin_profile_controller.rb @@ -1,7 +1,9 @@ +#TODO Ver quais metodos precisam estar aqui e fazer os testes class MezuroPluginProfileController < ProfileController append_view_path File.join(File.dirname(__FILE__) + '/../../views') +=begin rescue_from Exception do |exception| @message = process_error_message exception.message render :partial => "error_page" @@ -10,7 +12,7 @@ class MezuroPluginProfileController < ProfileController def error_page @message = params[:message] end - +=end protected def process_error_message message diff --git a/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb b/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb index ca6282c..0ed41b3 100644 --- a/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb +++ b/plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb @@ -10,7 +10,11 @@ class MezuroPlugin::Helpers::ContentViewerHelper [["Not Periodically", 0], ["1 day", 1], ["2 days", 2], ["Weekly", 7], ["Biweeky", 15], ["Monthly", 30]] end - def self.create_license_options + def self.periodicity_option(periodicity) + periodicity_options.select {|x| x.last == periodicity}.first.first + end + + def self.license_options options = YAML.load_file("#{RAILS_ROOT}/plugins/mezuro/licenses.yml") options = options.split(";") formated_options = [] @@ -44,12 +48,6 @@ class MezuroPlugin::Helpers::ContentViewerHelper metric_configuration_snapshot.metric.name.delete("() ") end - def self.get_license_option(selected) - options = YAML.load_file("#{RAILS_ROOT}/plugins/mezuro/licenses.yml") - options.split(";") - selected_option = options.find { |license| license == selected } - end - private def self.discretize_array(array) diff --git a/plugins/mezuro/views/mezuro_plugin_repository/show.html.erb b/plugins/mezuro/views/mezuro_plugin_repository/show.html.erb index b833711..4773b83 100644 --- a/plugins/mezuro/views/mezuro_plugin_repository/show.html.erb +++ b/plugins/mezuro/views/mezuro_plugin_repository/show.html.erb @@ -16,7 +16,7 @@