Sha256: 66978bed408bf6e6866ba38c49dbe9634d39e7a40f2a98a448723e6f1350c9b8

Contents?: true

Size: 264 Bytes

Versions: 213

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

213 entries across 213 versions & 2 rubygems

Version Path
bullet_train-themes-1.10.0 app/helpers/images_helper.rb
bullet_train-themes-1.9.0 app/helpers/images_helper.rb
bullet_train-themes-1.8.5 app/helpers/images_helper.rb
bullet_train-themes-1.8.4 app/helpers/images_helper.rb
bullet_train-themes-1.8.3 app/helpers/images_helper.rb
bullet_train-themes-1.8.2 app/helpers/images_helper.rb
bullet_train-themes-1.8.1 app/helpers/images_helper.rb
bullet_train-themes-1.8.0 app/helpers/images_helper.rb
bullet_train-themes-1.7.23 app/helpers/images_helper.rb
bullet_train-themes-1.7.22 app/helpers/images_helper.rb
bullet_train-themes-1.7.21 app/helpers/images_helper.rb
bullet_train-themes-1.7.20 app/helpers/images_helper.rb
bullet_train-themes-1.7.19 app/helpers/images_helper.rb
bullet_train-themes-1.7.18 app/helpers/images_helper.rb
bullet_train-themes-1.7.17 app/helpers/images_helper.rb
bullet_train-themes-1.7.16 app/helpers/images_helper.rb
bullet_train-themes-1.7.15 app/helpers/images_helper.rb
bullet_train-themes-1.7.14 app/helpers/images_helper.rb
bullet_train-themes-1.7.13 app/helpers/images_helper.rb
bullet_train-themes-1.7.12 app/helpers/images_helper.rb