Skip to content

Commit

Permalink
Adds _stylesheet to the resources to be generated. (#916)
Browse files Browse the repository at this point in the history
This produces a file like the following:

    <%#
    # Stylesheet Partial

    This partial imports the necessary stylesheets on each page.
    By default, it includes the application CSS,
    but each page can define additional CSS sources
    by providing a `content_for(:stylesheet)` block.
    %>

    <% Administrate::Engine.stylesheets.each do |css_path| %>
      <%= stylesheet_link_tag css_path %>
    <% end %>

    <%= yield :stylesheet %>

In `app/views/admin/application/_stylesheet.html.erb`. Fixes #888.
  • Loading branch information
nickcharlton authored Jul 3, 2017
1 parent 6c9d30c commit 1857fd4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/generators/administrate/views/layout_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def copy_template
)

call_generator("administrate:views:navigation")
copy_resource_template("_stylesheet")
copy_resource_template("_javascript")
copy_resource_template("_flashes")
end
Expand Down

0 comments on commit 1857fd4

Please sign in to comment.