Skip to content

Commit

Permalink
Change title tag to default to a titleized app name
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorianer committed Feb 20, 2024
1 parent 39abee1 commit e8ac9b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title><%%= content_for(:title) || "<%= camelized %>" %></title>
<title><%%= content_for(:title) || "<%= app_name.titleize %>" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<%%= csrf_meta_tags %>
Expand Down
2 changes: 1 addition & 1 deletion railties/test/generators/app_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def test_application_names_are_not_singularized

def test_application_name_is_normalized_in_config
run_generator [File.join(destination_root, "MyWebSite"), "-d", "postgresql"]
assert_file "MyWebSite/app/views/layouts/application.html.erb", /content_for\(:title\) \|\| "MyWebSite"/
assert_file "MyWebSite/app/views/layouts/application.html.erb", /content_for\(:title\) \|\| "My Web Site"/
assert_file "MyWebSite/config/database.yml", /my_web_site_production/
end

Expand Down

0 comments on commit e8ac9b5

Please sign in to comment.