Sha256: 2ec0740a7d85d8d36f1a7091edb7d708261fb75b347ddd290faaa9c2d2eb094b

Contents?: true

Size: 476 Bytes

Versions: 71

Compression:

Stored size: 476 Bytes

Contents

module ApplicationHelper

  def image_absolute_url(source)
    # this should work, but there's something funky going on with the asset paths
    host = Rails.application.routes.default_url_options[:host]
    path = ActionController::Base.helpers.asset_path(source, type: :image)
    path = path.gsub(host,'')
    path = (host + path).gsub('//','/')
    'http://' + path
    # 'http://' + Rails.application.routes.default_url_options[:host] + '/assets/' + source    
  end

end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
bonethug-0.0.40 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.39 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.38 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.37 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.36 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.35 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.33 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.32 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.31 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.30 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.29 skel/project_types/rails4/app/helpers/application_helper.rb