Sha256: 66978bed408bf6e6866ba38c49dbe9634d39e7a40f2a98a448723e6f1350c9b8

Contents?: true

Size: 264 Bytes

Versions: 214

Compression:

Stored size: 264 Bytes

Contents

module ImagesHelper
  def image_width_for_height(filename, target_height)
    source_width, source_height = FastImage.size("#{Rails.root}/app/assets/images/#{filename}")
    ratio = source_width.to_f / source_height.to_f
    (target_height * ratio).to_i
  end
end

Version data entries

214 entries across 214 versions & 2 rubygems

Version Path
bullet_train-1.6.6 app/helpers/images_helper.rb
bullet_train-1.6.5 app/helpers/images_helper.rb
bullet_train-1.6.4 app/helpers/images_helper.rb
bullet_train-1.6.3 app/helpers/images_helper.rb
bullet_train-1.6.2 app/helpers/images_helper.rb
bullet_train-1.6.1 app/helpers/images_helper.rb
bullet_train-1.6.0 app/helpers/images_helper.rb
bullet_train-1.5.2 app/helpers/images_helper.rb
bullet_train-1.5.1 app/helpers/images_helper.rb
bullet_train-1.5.0 app/helpers/images_helper.rb
bullet_train-1.4.11 app/helpers/images_helper.rb
bullet_train-1.4.10 app/helpers/images_helper.rb
bullet_train-1.4.9 app/helpers/images_helper.rb
bullet_train-1.4.8 app/helpers/images_helper.rb
bullet_train-1.4.7 app/helpers/images_helper.rb
bullet_train-1.4.6 app/helpers/images_helper.rb
bullet_train-1.4.5 app/helpers/images_helper.rb
bullet_train-1.4.4 app/helpers/images_helper.rb
bullet_train-1.4.3 app/helpers/images_helper.rb
bullet_train-1.4.2 app/helpers/images_helper.rb