Noosfero/noosfero

View on GitHub
plugins/metadata/lib/metadata_plugin/controllers.rb

Summary

Maintainability
A
0 mins
Test Coverage
class MetadataPlugin::Controllers
  def manage_products
    :@product
  end

  def content_viewer
    lambda do
      if profile && @page && (profile.home_page_id == @page.id)
        @profile
      elsif @page.respond_to? :encapsulated_instance
        @page.encapsulated_instance
      else
        @page
      end
    end
  end

  def profile
    :@profile
  end

  def home
    :@environment
  end
end