File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 7
7
<%= stylesheet_link_tag "tailwind" , "inter-font" , "data-turbo-track" : "reload" %>
8
8
ERB
9
9
10
- insert_into_file APPLICATION_LAYOUT_PATH . to_s , %( <main class="container mx-auto mt-28 px-5 flex">\n ) , before : CENTERING_CONTAINER_INSERTION_POINT
11
- insert_into_file APPLICATION_LAYOUT_PATH . to_s , %(\n </main>) , after : CENTERING_CONTAINER_INSERTION_POINT
10
+ if File . open ( APPLICATION_LAYOUT_PATH ) . read =~ /<body>\n \s *<%= yield %>\n \s *<\/ body>/
11
+ insert_into_file APPLICATION_LAYOUT_PATH . to_s , %( <main class="container mx-auto mt-28 px-5 flex">\n ) , before : CENTERING_CONTAINER_INSERTION_POINT
12
+ insert_into_file APPLICATION_LAYOUT_PATH . to_s , %(\n </main>) , after : CENTERING_CONTAINER_INSERTION_POINT
13
+ end
12
14
else
13
15
say "Default application.html.erb is missing!" , :red
14
16
say %( Add <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> within the <head> tag in your custom layout.)
You can’t perform that action at this time.
0 commit comments