分類方法
由controller來找所對應的css , javascript
def render_stylesheets(tag_html = nil)html = []if tag_html.present?html << tag_htmlelsehtml << stylesheet_link_tag('application', :media => 'all')html << stylesheet_link_tag(namespace, :media => 'all')endhtml.join("\n").html_safeenddef render_javascripts(tag_html = nil)html = []if tag_html.present?html << tag_htmlelsehtml << javascript_include_tag("application", "data-turbolinks-track" => true)html << javascript_include_tag(namespace, "data-turbolinks-track" => true)endhtml.join("\n").html_safeenddef namespacecontroller_path.split('/').firstend
沒有留言:
張貼留言