Module: ThemesForRails::ViewHelpers::InstanceMethods

Defined in:
lib/themes_for_rails/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#current_theme_image_path(asset) ⇒ Object



16
17
18
# File 'lib/themes_for_rails/view_helpers.rb', line 16

def current_theme_image_path(asset)
  base_theme_image_path(:theme => self.theme_name, :asset => asset)
end

#current_theme_javascript_path(asset) ⇒ Object



13
14
15
# File 'lib/themes_for_rails/view_helpers.rb', line 13

def current_theme_javascript_path(asset)
  base_theme_javascript_path(:theme => self.theme_name, :asset => "#{asset}.js")
end

#current_theme_stylesheet_path(asset) ⇒ Object



10
11
12
# File 'lib/themes_for_rails/view_helpers.rb', line 10

def current_theme_stylesheet_path(asset)
  base_theme_stylesheet_path(:theme => self.theme_name, :asset => "#{asset}.css")
end

#theme_image_path(asset, new_theme_name = self.theme_name) ⇒ Object



28
29
30
# File 'lib/themes_for_rails/view_helpers.rb', line 28

def theme_image_path(asset, new_theme_name = self.theme_name)
  base_theme_image_path(:theme => new_theme_name, :asset => asset)
end

#theme_image_tag(source, options = {}) ⇒ Object



32
33
34
# File 'lib/themes_for_rails/view_helpers.rb', line 32

def theme_image_tag(source, options = {})
  image_tag(theme_image_path(source), options)
end

#theme_javascript_include_tag(*files) ⇒ Object



36
37
38
39
# File 'lib/themes_for_rails/view_helpers.rb', line 36

def theme_javascript_include_tag(*files)
  files.collect! {|file| theme_javascript_path(file) }
  javascript_include_tag *files
end

#theme_javascript_path(asset, new_theme_name = self.theme_name) ⇒ Object



24
25
26
# File 'lib/themes_for_rails/view_helpers.rb', line 24

def theme_javascript_path(asset, new_theme_name = self.theme_name)
  base_theme_javascript_path(:theme => new_theme_name, :asset => "#{asset}.js")
end


41
42
43
44
45
46
# File 'lib/themes_for_rails/view_helpers.rb', line 41

def theme_stylesheet_link_tag(*files)
  options = files.extract_options!
  files.collect! {|file| theme_stylesheet_path(file) }
  files << options
  stylesheet_link_tag(*files)
end

#theme_stylesheet_path(asset, new_theme_name = self.theme_name) ⇒ Object



20
21
22
# File 'lib/themes_for_rails/view_helpers.rb', line 20

def theme_stylesheet_path(asset, new_theme_name = self.theme_name)
  base_theme_stylesheet_path(:theme => new_theme_name, :asset => "#{asset}.css")
end