Colin Ambler
Joined
230 Experience
2 Lessons Completed
0 Questions Solved
Activity
Was there ever a post on this?
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 %>