<%= form_for(resource, :as => resource_name, :url => insert_user_phone_verification_path(resource_name), :html => { :method => :get }, remote: true) do |f| %> <%= devise_error_messages! %> <%= f.submit "Resend Phone Verification Code" %> <% end %>