module SeajsHelper
# generate seajs.use()
# if you use a module in base dir,please add #
def seajs_use(*modules)
seajs_config = Rails.application.config.seajs
if seajs_config.compiled?
modules.map! { |m| seajs_config.family + '/' + m }
else
modules.map! { |m| '/assets/' + m }
end
html = <<-html
html
html.html_safe
end
# include seajs script and map config
def seajs_tag
seajs_config = Rails.application.config.seajs
html = <<-html
html
html.html_safe
end
end