Sha256: f4bc595c9283510eb151b81e92fd8f6e45d9048739df8a9de40dc64f73fe5ef2

Contents?: true

Size: 578 Bytes

Versions: 32

Compression:

Stored size: 578 Bytes

Contents

module Lentil
  module ImagesHelper

    def already_like_voted?(image)
      session['liked_images'] && session['liked_images'].include?(image.id.to_s)
    end

    def already_flagged?(image)
      session['flagged_images'] && session['flagged_images'].include?(image.id.to_s)
    end

    # FIXME: This doesn't seem to be used
    # def feed_url(protocol)
    #   unless current_page?(root_url)
    #     "#{request.protocol}#{request.host_with_port}#{request.fullpath}.#{protocol}"
    #   else
    #     "#{images_recent_url}.#{protocol}"
    #   end
    # end

  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
lentil-1.0.5 app/helpers/lentil/images_helper.rb
lentil-1.0.4 app/helpers/lentil/images_helper.rb
lentil-1.0.3 app/helpers/lentil/images_helper.rb
lentil-1.0.2 app/helpers/lentil/images_helper.rb
lentil-1.0.1 app/helpers/lentil/images_helper.rb
lentil-1.0.0 app/helpers/lentil/images_helper.rb
lentil-0.9.1 app/helpers/lentil/images_helper.rb
lentil-0.9.0 app/helpers/lentil/images_helper.rb
lentil-0.8.0 app/helpers/lentil/images_helper.rb
lentil-0.7.1 app/helpers/lentil/images_helper.rb
lentil-0.6.0 app/helpers/lentil/images_helper.rb
lentil-0.5.2 app/helpers/lentil/images_helper.rb
lentil-0.5.1 app/helpers/lentil/images_helper.rb
lentil-0.5.0 app/helpers/lentil/images_helper.rb
lentil-0.4.2 app/helpers/lentil/images_helper.rb
lentil-0.4.0 app/helpers/lentil/images_helper.rb
lentil-0.3.1 app/helpers/lentil/images_helper.rb
lentil-0.3.0 app/helpers/lentil/images_helper.rb
lentil-0.2.3 app/helpers/lentil/images_helper.rb
lentil-0.2.2 app/helpers/lentil/images_helper.rb