Module: AdminAssistant::Helper

Defined in:
lib/admin_assistant/helper.rb

Instance Method Summary collapse

Instance Method Details

#admin_assistant_includes(opts = {}) ⇒ Object


3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/admin_assistant/helper.rb', line 3

def admin_assistant_includes(opts = {})
  ss_name = "admin_assistant/admin_assistant"
  ss_name << "_#{opts[:theme]}" if opts[:theme]
  tags = stylesheet_link_tag(ss_name)
  tags << stylesheet_link_tag("admin_assistant/token-input")
  js_dir =
    Pathname.new(Rails.root) + "public/javascripts/admin_assistant"
  Dir.entries(js_dir).each do |entry|
    if entry =~ /\.js$/
      tags << javascript_include_tag("admin_assistant/#{entry}")
    end
  end
  tags
end