Skip to content
Snippets Groups Projects
Commit c3f7d484 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

fix learning object show

parent 9459c5a4
No related branches found
No related tags found
No related merge requests found
module LearningObjectsHelper
def display_object_type(learning_object)
case learning_object.default_attachment.mime_type
case learning_object.default_attachment.try(:mime_type)
when /audio\/*/i then
audio_tag(learning_object.cache_link, controls: true)
when /video\/mp4/i then
......@@ -86,7 +86,7 @@ module LearningObjectsHelper
def highlighted_btn(url, _label = nil, _class = nil)
link_to url, class: 'download btn btn-success', target: "_blank" do
content_tag(:i, _label, class: "fa #{_class}").html_safe
"<i class='fa #{_class}'></i> #{_label}".html_safe
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment