Module: Hermitage::Defaults

Defined in:
lib/hermitage/defaults.rb

Constant Summary collapse

ORIGINAL =

Model’s attribute (or method) that returns the path to the original image

'file.url'
THUMBNAIL =

Model’s attribute (or method) that returns the path to the image’s thumbnail

'file.url(:thumbnail)'
TITLE =

Model’s attribute (or method) that returns title or description of image

nil
LIST_TAG =

Wrapper for the whole gallery

:ul
ITEM_TAG =

Wrapepr for each gallery item

:li
LIST_CLASS =

CSS classes for elements of markup (defaults are for pretty look with Twitter Bootstrap)

'thumbnails'
ITEM_CLASS =
'span4'
'thumbnail'
IMAGE_CLASS =
nil
EACH_SLICE =

Slices each N images into the separate gallery. It is helpful e.g. when using Twitter Bootstrap framework and your gallery is inside ‘.row-fluid` block.

nil

Class Method Summary collapse

Class Method Details

.to_hashObject

Returns hash of default options



31
32
33
34
35
36
37
# File 'lib/hermitage/defaults.rb', line 31

def self.to_hash
  hash = {}
  Hermitage::Defaults.constants.each do |c|
    hash[c.downcase.to_sym] = Hermitage::Defaults.const_get(c)
  end
  hash
end