-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Added helper which provide ability to add your html to <head> tag #2270
Conversation
I'd prefer to see a block helper for rendering the UI so the plugin author can inject any sort of head content: <% add_to_head do %>
<link rel="stylesheet" .../>
<% end %>
<h1>History</h1>
... |
wow! I like it, thanks for great idea 👍 |
3756789
to
8488dee
Compare
Fantastic. 🤘 |
Can you make it support multiple blocks? |
@mperham I'm sorry, but i don't understand you correctly 😓 # in partial #1
<% add_to_head do %>
<link rel="stylesheet" href="css1.css"/>
<% end %>
# in partial #2
<% add_to_head do %>
<link rel="stylesheet" href="css2.css"/>
<% end %>
# in partial #3
<% add_to_head do %>
<link rel="stylesheet" href="css3.css"/>
<% end %>
# in layout partial
<%= display_custom_head %>
# => <link rel="stylesheet" href="css1.css"/>
<link rel="stylesheet" href="css2.css"/>
<link rel="stylesheet" href="css3.css"/> ? |
Exactly.
|
@mperham I have a little problem with procs in erb, that why I'll hold PR a little 😟 |
8488dee
to
fc144dd
Compare
Beautiful, really nice work. |
Added helper which provide ability to add your html to <head> tag
Thanks! 🎆 |
Why this needed?
These changes will allow easily define custom tags for page
<head>
in any sidekiq plugins.Use case