On 25 February 2016 at 18:59, Andrew Dig <[email protected]> wrote:
> Hi everyone! A few days I can't resolve a task. I want to build a single
> page app without any page refresh. So I have a button 'Add', onclick it
> inserts in a DOM a simple remote:true form and when I try to submit this
> form - nothing happens BUT if i refresh the page - it works. Guess some
> handler is absent but not sure. Advise please. Here's my form
>  <%= form_tag(:add_task, method: 'post', remote: true) do %>
>             <td>
>               <span class="glyphicon glyphicon-plus"></span>
>             </td>
>             <td>
>               <%= text_field(:task,:project_id,type: 'hidden',value:
> @project.id)%>
>               <%= text_field(:task,:name,class: 'form-control
> task_field', placeholder: 'Start typing here to create a task...')%>
>             </td>
>             <td>
>               <%= button_tag('Add task',class:'btn btn-add_task') %>
>             </td>
>         <% end %>

The first thing to do is to look in development.log and see if it
submitting correctly.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuTGdTP9tsma-xp-H7bgVi7-v-Zi5NN-LJo1PVXJ0-o5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to