Sha256: 13712d88820dbb81d79f031330d13aa3a1e82d6f0b1d53847151a79a78765dbb

Contents?: true

Size: 642 Bytes

Versions: 7

Compression:

Stored size: 642 Bytes

Contents

require_dependency Iqvoc.root.join('app/controllers/rdf_controller').to_s

class RdfController
  def show_with_labels
    scope = params[:published] == '0' ? Iqvoc::XLLabel.base_class.unpublished : Iqvoc::XLLabel.base_class.published
    if @label = scope.by_origin(params[:id]).with_associations.last
      respond_to do |format|
        format.html {
          redirect_to label_url(id: @label.origin, published: params[:published])
        }
        format.any {
          authorize! :read, @label
          render 'show_label'
        }
      end
    else
      show_without_labels
    end
  end

  alias_method_chain(:show, :labels)
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iqvoc_skosxl-2.9.1 app/controllers/rdf_controller.rb
iqvoc_skosxl-2.9.0 app/controllers/rdf_controller.rb
iqvoc_skosxl-2.8.1 app/controllers/rdf_controller.rb
iqvoc_skosxl-2.8.0 app/controllers/rdf_controller.rb
iqvoc_skosxl-2.7.0 app/controllers/rdf_controller.rb
iqvoc_skosxl-2.6.0 app/controllers/rdf_controller.rb
iqvoc_skosxl-2.5.0 app/controllers/rdf_controller.rb