Sha256: 76c7aee0e27742b219de5d0a15a94d04134b2dcdf8ea5304826a70ff4f7de730

Contents?: true

Size: 498 Bytes

Versions: 5

Compression:

Stored size: 498 Bytes

Contents

module PublishMyData
  class OntologyClassRenderParams

    def initialize(resource)
      @resource = resource
      @ontology_class = resource.as_ontology_class
    end

    def render_params(opts={})

      if opts[:is_html]
        @ontology_class.eager_load_predicate_triples!(:labels_only => true)
        @ontology_class.eager_load_object_triples!(:labels_only => true)
      end

      {template: 'publish_my_data/classes/show', locals: {ontology_class: @ontology_class}}
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
publish_my_data-0.0.25 lib/publish_my_data/render_params/ontology_class_render_params.rb
publish_my_data-0.0.24 lib/publish_my_data/render_params/ontology_class_render_params.rb
publish_my_data-0.0.23 lib/publish_my_data/render_params/ontology_class_render_params.rb
publish_my_data-0.0.22 lib/publish_my_data/render_params/ontology_class_render_params.rb
publish_my_data-0.0.21 lib/publish_my_data/render_params/ontology_class_render_params.rb