Colin Ambler

Joined

120 Experience
1 Lesson Completed
0 Questions Solved

Activity

Do you have source code on this episode?

I implemented Chris' approach with below code. However it only considers "Create" (whereas with a f.submit button the text becomes flexible "Create" or "Update"). How would you accommodate this for edit scenario?

<%= form.button class: 'btn btn-primary' do %>
      <span class="show-when-enabled">Create Post</span>
      <span class="show-when-disabled">Processing...</span>
<% end %>