Sha256: e5b3c78f8e0570e3a76fa9de3ebf097a7834cdae4be6af4b7fcd87b7ebe52d8a
Contents?: true
Size: 899 Bytes
Versions: 3
Compression:
Stored size: 899 Bytes
Contents
module Guilded module Rails module ViewHelpers # Generates the JavaScript includes for each Guilded element that is used. Also # generates the initGuildedElements function and includes a call to each GUIlded # elements Init method. # # Must be called once per rendered page. You can include it just before the closing body # tag of your application layout. If no Guilded elements were called in the template, the # call to g_apply_behavior will not output anything. # def g_apply_behavior g = Guilded::Guilder.instance html = stylesheet_link_tag( g.combined_css_srcs, :cache => "cache/#{g.css_cache_name}" ) html << javascript_include_tag( g.combined_js_srcs, :cache => "cache/#{g.js_cache_name}" ) html << g.generate_javascript_init g.reset! html end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
midas-guilded-0.0.2 | lib/guilded/rails/view_helpers.rb |
midas-guilded-0.0.3 | lib/guilded/rails/view_helpers.rb |
midas-guilded-0.0.4 | lib/guilded/rails/view_helpers.rb |