Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

=content_for :stylesheet #567

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/views/administrate/application/_stylesheet.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<%#
# Stylesheet Partial

This partial imports the necessary javascript 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.
%>

<%= stylesheet_link_tag "administrate/application", media: "all" %>

<%= yield :stylesheet %>
3 changes: 2 additions & 1 deletion app/views/layouts/administrate/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ By default, it renders:
<meta name="ROBOTS" content="NOODP" />
<meta name="viewport" content="initial-scale=1" />
<title><%= content_for(:title) %> | <%= Rails.application.class.parent_name.titlecase %></title>
<%= stylesheet_link_tag "administrate/application", media: "all" %>
<%= render "stylesheet" %>

<%= csrf_meta_tags %>
</head>

Expand Down