Commit a9e1c58
Changed files (2)
app
views
layouts
workouts
app/views/layouts/application.html.erb
@@ -10,7 +10,6 @@
<%= javascript_include_tag "https://apis.google.com/js/api.js" %>
<%= javascript_include_tag "https://apis.google.com/js/client.js" %>
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_MAPS_API_KEY']}" %>
- </script>
<%= csrf_meta_tags %>
</head>
<body class="<%= controller_name %> <%= action_name %>">
app/views/workouts/new.html.erb
@@ -6,7 +6,7 @@
<%= link_to "Switch to Routine #{routine.name}", new_workout_path(routine_id: routine.id) %>
</p>
<% end %>
- <%= form_for @workout do |f| %>
+ <%= form_for @workout, remote: true do |f| %>
<%= f.hidden_field :routine_id %>
<fieldset class="fieldset">
<legend><%= Workout.human_attribute_name(:body_weight) %></legend>
@@ -46,7 +46,7 @@
<% end %>
</fieldset>
<% end %>
- <%= f.submit "Start", class: "button round right" %>
+ <%= f.submit "Start", class: "button round right", data: { disable_with: 'Saving' } %>
<% end %>
</div>
</div>