Commit 6569e61a1957414737d6754fa5401a77fe080dbf
1 parent
8a1be65d
Exists in
master
and in
29 other branches
metadata: Use ALL_CAPS
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
plugins/metadata/lib/metadata_plugin.rb
| ... | ... | @@ -17,7 +17,7 @@ class MetadataPlugin < Noosfero::Plugin |
| 17 | 17 | @og_types ||= self.config[:open_graph][:types] rescue {} |
| 18 | 18 | end |
| 19 | 19 | |
| 20 | - Controllers = { | |
| 20 | + CONTROLLERS = { | |
| 21 | 21 | manage_products: { |
| 22 | 22 | variable: :@product, |
| 23 | 23 | }, |
| ... | ... | @@ -44,9 +44,9 @@ class MetadataPlugin < Noosfero::Plugin |
| 44 | 44 | def head_ending |
| 45 | 45 | plugin = self |
| 46 | 46 | lambda do |
| 47 | - options = MetadataPlugin::Controllers[controller.controller_path.to_sym] | |
| 48 | - options ||= MetadataPlugin::Controllers[:profile] if controller.is_a? ProfileController | |
| 49 | - options ||= MetadataPlugin::Controllers[:environment] | |
| 47 | + options = MetadataPlugin::CONTROLLERS[controller.controller_path.to_sym] | |
| 48 | + options ||= MetadataPlugin::CONTROLLERS[:profile] if controller.is_a? ProfileController | |
| 49 | + options ||= MetadataPlugin::CONTROLLERS[:environment] | |
| 50 | 50 | return unless options |
| 51 | 51 | |
| 52 | 52 | return unless object = case variable = options[:variable] | ... | ... |