Module: Spree::Admin::MaterialsHelper
- Defined in:
- app/helpers/spree/admin/materials_helper.rb
Instance Method Summary collapse
Instance Method Details
#format_material_created_at(material) ⇒ Object
4 5 6 |
# File 'app/helpers/spree/admin/materials_helper.rb', line 4 def format_material_created_at(material) material.created_at.strftime("%Y-%m-%d %H:%M:%S") end |
#material_full_url(material) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/helpers/spree/admin/materials_helper.rb', line 8 def material_full_url(material) url = material.original_url uri = URI.parse(url) if uri.host.nil? return request.base_url + url end url rescue URI::InvalidURIError url end |