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.99 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.98 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.97 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.96 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.95 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.93 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.92 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.91 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.90 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.89 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.88 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.87 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.86 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.85 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.84 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.83 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.82 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.81 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.80 skel/project_types/rails4/app/helpers/application_helper.rb
bonethug-0.0.79 skel/project_types/rails4/app/helpers/application_helper.rb