4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'app/controllers/rdf_controller.rb', line 4
def show_with_labels
scope = params[:published] == "0" ? Iqvoc::XLLabel.base_class.scoped.unpublished : Iqvoc::XLLabel.base_class.scoped.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
|