September 2016
Intermediate to advanced
488 pages
12h 21m
English
We’ve completed the task, but we need to advertise its availability more. We spy some unused area in the top-right side of the layout, so we add a form immediately before the image_tag:
| | <div id="banner"> |
| » | <%= form_tag store_index_path, class: 'locale' do %> |
| » | <%= select_tag 'set_locale', |
| » | options_for_select(LANGUAGES, I18n.locale.to_s), |
| » | onchange: 'this.form.submit()' %> |
| » | <%= submit_tag 'submit' %> |
| » | <%= javascript_tag "$('.locale input').hide()" %> |
| » | <% end %> |
| | <%= image_tag 'logo.svg', alt: 'The Pragmatic Bookshelf' %> |
| | <span class="title"><%= @page_title %></span> |
| | </div> |
The form_tag specifies ...
Read now
Unlock full access