Testing showed issue with title using common layout :(

Resolved. The common layout worked great for 12 screens, but for the main page, with no specific table being selected it looked wrong as it was still trying to refer to a table name 😦 Fixed it with this little bit of code i cooked up :chef: in /views/layouts/standard.html.erb Note the not ("!") just in order to list the other first.

<% if !(controller.action_name == "index" && controller_name == "adminer") %>
	<h1>Table: <%= controller_name %></h1>
<% else %>
	<h1>Table: All</h1>
<% end %>

Also (no "!") could also have been

<% if (controller.action_name == "index" && controller_name == "adminer") %>
	<h1>Table: All</h1>
<% else %>
	<h1>Table: <%= controller_name %></h1>
<% end %>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s