Sha256: ace53d5f257c7557b7ef88fcd4539e92b63c892abe6b8978a6e95eaa1ea62b26

Contents?: true

Size: 623 Bytes

Versions: 20

Compression:

Stored size: 623 Bytes

Contents

module Alchemy
  module PicturesHelper

    # This helper returns a path to picture for use inside a image_tag helper.
    #
    # Any additional options are passed to the url_helper, so you can add arguments to your url.
    #
    # Example:
    #
    #   <%= image_tag alchemy_picture_path(picture, :size => '320x200', :format => :png) %>
    #
    def alchemy_picture_path(picture, options={})
      defaults = {:format => Alchemy::Config.get(:image_output_format)}
      options = defaults.update(options)
      alchemy.show_picture_path({:id => picture.id, :name => picture.urlname}.merge(options))
    end

  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
alchemy_cms-2.3.2 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.4 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.3.1 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.3.2 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.3.1 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.3.0 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.3.rc5 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.2 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.1 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.0 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc15 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc14 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc13 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc11 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc8 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc7 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc6 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc3 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc2 app/helpers/alchemy/pictures_helper.rb
alchemy_cms-2.2.rc1 app/helpers/alchemy/pictures_helper.rb