AJAX not working in Rails same-page update









up vote
-1
down vote

favorite












I am trying to build a Q&A app with Ajax on the Index.html.erb. I manage to get the form remotely loading, but when saving the records, the AJAX does not work and the user is taken to the normal show.html.erb. Apart from the Ajax not kicking off, everything works well.



My code is as below:



index.html.erb (Contain a partial for input, and a partial for results)



<div>
<h3 class="section_title"> Q&A </h3>
<hr>
<div id="qanda-form" style="display:none;"> </div>
</div>
<div id="qandas">
<%= render 'qandas/qanda' %>
</div>


_qanda.html.erb (is the partial for results)



<% @qandas.each do |my_qanda| %>
<div class="col-md-9">
<div>
Created <%= local_time(my_qanda.created_at) %>, by <%= User.find_by(id: my_qanda.user_id).full_name %>
</div>
</div>
<% end %>


_form.html.erb (is the input form - has nested form via Cocoon)



<%= simple_form_for @qanda, remote: true do |f| %>
<%= f.error_notification %>
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<div class="col-md-12 form-inputs">
<div class="col-md-8">
<%= f.input :title, label: 'Q&A Title:' %>
</div>
</div>
<div class="qandasquestions">
<%= f.simple_fields_for :qandasquestions do |builder| %>
<% render 'qandas/qandasquestion_fields', f: builder %>
<% end %>
<div class="links btn-group" style="min-height: 34px !important">
<%= f.button :submit, "Publish Q&A", class: "btn btn-default" %>
<%= link_to_add_association 'Add Question', f, :qandasquestions, class: 'btn btn-default', data: association_insertion_node: '.qandasquestions', association_insertion_method: :append %>
<%= link_to 'Back', qandas_path, class: "btn btn-default" %>
<%= f.input :company, :as => :hidden, :input_html => :value => current_user.company %>
</div>
</div>
<% end %>


Controller:



def index
@qandas = Qanda.all
respond_to do |format|
@qandas = Qanda.all
format.html
format.json
end
end

def create
@qanda = current_user.qandas.build(qanda_params)
respond_to do |format|
if @qanda.save!
@qandas = Qanda.all
format.html redirect_to @qanda, notice: 'Qanda was successfully created.'
format.json render :layout => false
else
format.html render :new
format.json render json: @qanda.errors, status: :unprocessable_entity
end
end
end


create.js.erb



$('#qandas').html("<%= j render partial: 'qandas/qanda' %>");
$('#qanda-form').slideUp(350);


new.js.erb



$('#qanda-form').html("<%= j render 'qandas/form' %>");
$('#qanda-form').slideDown(350);


Anybody can see why the Ajax does not kick off please? why am I redirected to the traditional SHOW page please?










share|improve this question























  • the request you're sending is of js not json so remove format.html and format.json and just write format.js and your instance variable will be available in create.js.erb as well.
    – Gagan Gupta
    Nov 9 at 6:51











  • Hey Gagan, thanks a lot. I made the change and get the following error : ActionController::UnknownFormat Extracted source (around line #38): end end respond_to do |format| @qandas = Qanda.all format.js
    – Etienne
    Nov 9 at 14:15










  • I m sure this must not be difficult, certainly I am missing a small point.
    – Etienne
    Nov 9 at 21:18










  • @GaganGupta, what do you mean by "your instance variable will be available in create.js.erb as well."?
    – Etienne
    Nov 10 at 22:01










  • @qanda and @qandas are instance variables and they'll be available on views as well. Here the view would be create.js.erb. umm, I am posting an answer as I cannot write the code here. just let me know if it is working
    – Gagan Gupta
    Nov 10 at 22:03














up vote
-1
down vote

favorite












I am trying to build a Q&A app with Ajax on the Index.html.erb. I manage to get the form remotely loading, but when saving the records, the AJAX does not work and the user is taken to the normal show.html.erb. Apart from the Ajax not kicking off, everything works well.



My code is as below:



index.html.erb (Contain a partial for input, and a partial for results)



<div>
<h3 class="section_title"> Q&A </h3>
<hr>
<div id="qanda-form" style="display:none;"> </div>
</div>
<div id="qandas">
<%= render 'qandas/qanda' %>
</div>


_qanda.html.erb (is the partial for results)



<% @qandas.each do |my_qanda| %>
<div class="col-md-9">
<div>
Created <%= local_time(my_qanda.created_at) %>, by <%= User.find_by(id: my_qanda.user_id).full_name %>
</div>
</div>
<% end %>


_form.html.erb (is the input form - has nested form via Cocoon)



<%= simple_form_for @qanda, remote: true do |f| %>
<%= f.error_notification %>
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<div class="col-md-12 form-inputs">
<div class="col-md-8">
<%= f.input :title, label: 'Q&A Title:' %>
</div>
</div>
<div class="qandasquestions">
<%= f.simple_fields_for :qandasquestions do |builder| %>
<% render 'qandas/qandasquestion_fields', f: builder %>
<% end %>
<div class="links btn-group" style="min-height: 34px !important">
<%= f.button :submit, "Publish Q&A", class: "btn btn-default" %>
<%= link_to_add_association 'Add Question', f, :qandasquestions, class: 'btn btn-default', data: association_insertion_node: '.qandasquestions', association_insertion_method: :append %>
<%= link_to 'Back', qandas_path, class: "btn btn-default" %>
<%= f.input :company, :as => :hidden, :input_html => :value => current_user.company %>
</div>
</div>
<% end %>


Controller:



def index
@qandas = Qanda.all
respond_to do |format|
@qandas = Qanda.all
format.html
format.json
end
end

def create
@qanda = current_user.qandas.build(qanda_params)
respond_to do |format|
if @qanda.save!
@qandas = Qanda.all
format.html redirect_to @qanda, notice: 'Qanda was successfully created.'
format.json render :layout => false
else
format.html render :new
format.json render json: @qanda.errors, status: :unprocessable_entity
end
end
end


create.js.erb



$('#qandas').html("<%= j render partial: 'qandas/qanda' %>");
$('#qanda-form').slideUp(350);


new.js.erb



$('#qanda-form').html("<%= j render 'qandas/form' %>");
$('#qanda-form').slideDown(350);


Anybody can see why the Ajax does not kick off please? why am I redirected to the traditional SHOW page please?










share|improve this question























  • the request you're sending is of js not json so remove format.html and format.json and just write format.js and your instance variable will be available in create.js.erb as well.
    – Gagan Gupta
    Nov 9 at 6:51











  • Hey Gagan, thanks a lot. I made the change and get the following error : ActionController::UnknownFormat Extracted source (around line #38): end end respond_to do |format| @qandas = Qanda.all format.js
    – Etienne
    Nov 9 at 14:15










  • I m sure this must not be difficult, certainly I am missing a small point.
    – Etienne
    Nov 9 at 21:18










  • @GaganGupta, what do you mean by "your instance variable will be available in create.js.erb as well."?
    – Etienne
    Nov 10 at 22:01










  • @qanda and @qandas are instance variables and they'll be available on views as well. Here the view would be create.js.erb. umm, I am posting an answer as I cannot write the code here. just let me know if it is working
    – Gagan Gupta
    Nov 10 at 22:03












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I am trying to build a Q&A app with Ajax on the Index.html.erb. I manage to get the form remotely loading, but when saving the records, the AJAX does not work and the user is taken to the normal show.html.erb. Apart from the Ajax not kicking off, everything works well.



My code is as below:



index.html.erb (Contain a partial for input, and a partial for results)



<div>
<h3 class="section_title"> Q&A </h3>
<hr>
<div id="qanda-form" style="display:none;"> </div>
</div>
<div id="qandas">
<%= render 'qandas/qanda' %>
</div>


_qanda.html.erb (is the partial for results)



<% @qandas.each do |my_qanda| %>
<div class="col-md-9">
<div>
Created <%= local_time(my_qanda.created_at) %>, by <%= User.find_by(id: my_qanda.user_id).full_name %>
</div>
</div>
<% end %>


_form.html.erb (is the input form - has nested form via Cocoon)



<%= simple_form_for @qanda, remote: true do |f| %>
<%= f.error_notification %>
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<div class="col-md-12 form-inputs">
<div class="col-md-8">
<%= f.input :title, label: 'Q&A Title:' %>
</div>
</div>
<div class="qandasquestions">
<%= f.simple_fields_for :qandasquestions do |builder| %>
<% render 'qandas/qandasquestion_fields', f: builder %>
<% end %>
<div class="links btn-group" style="min-height: 34px !important">
<%= f.button :submit, "Publish Q&A", class: "btn btn-default" %>
<%= link_to_add_association 'Add Question', f, :qandasquestions, class: 'btn btn-default', data: association_insertion_node: '.qandasquestions', association_insertion_method: :append %>
<%= link_to 'Back', qandas_path, class: "btn btn-default" %>
<%= f.input :company, :as => :hidden, :input_html => :value => current_user.company %>
</div>
</div>
<% end %>


Controller:



def index
@qandas = Qanda.all
respond_to do |format|
@qandas = Qanda.all
format.html
format.json
end
end

def create
@qanda = current_user.qandas.build(qanda_params)
respond_to do |format|
if @qanda.save!
@qandas = Qanda.all
format.html redirect_to @qanda, notice: 'Qanda was successfully created.'
format.json render :layout => false
else
format.html render :new
format.json render json: @qanda.errors, status: :unprocessable_entity
end
end
end


create.js.erb



$('#qandas').html("<%= j render partial: 'qandas/qanda' %>");
$('#qanda-form').slideUp(350);


new.js.erb



$('#qanda-form').html("<%= j render 'qandas/form' %>");
$('#qanda-form').slideDown(350);


Anybody can see why the Ajax does not kick off please? why am I redirected to the traditional SHOW page please?










share|improve this question















I am trying to build a Q&A app with Ajax on the Index.html.erb. I manage to get the form remotely loading, but when saving the records, the AJAX does not work and the user is taken to the normal show.html.erb. Apart from the Ajax not kicking off, everything works well.



My code is as below:



index.html.erb (Contain a partial for input, and a partial for results)



<div>
<h3 class="section_title"> Q&A </h3>
<hr>
<div id="qanda-form" style="display:none;"> </div>
</div>
<div id="qandas">
<%= render 'qandas/qanda' %>
</div>


_qanda.html.erb (is the partial for results)



<% @qandas.each do |my_qanda| %>
<div class="col-md-9">
<div>
Created <%= local_time(my_qanda.created_at) %>, by <%= User.find_by(id: my_qanda.user_id).full_name %>
</div>
</div>
<% end %>


_form.html.erb (is the input form - has nested form via Cocoon)



<%= simple_form_for @qanda, remote: true do |f| %>
<%= f.error_notification %>
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<div class="col-md-12 form-inputs">
<div class="col-md-8">
<%= f.input :title, label: 'Q&A Title:' %>
</div>
</div>
<div class="qandasquestions">
<%= f.simple_fields_for :qandasquestions do |builder| %>
<% render 'qandas/qandasquestion_fields', f: builder %>
<% end %>
<div class="links btn-group" style="min-height: 34px !important">
<%= f.button :submit, "Publish Q&A", class: "btn btn-default" %>
<%= link_to_add_association 'Add Question', f, :qandasquestions, class: 'btn btn-default', data: association_insertion_node: '.qandasquestions', association_insertion_method: :append %>
<%= link_to 'Back', qandas_path, class: "btn btn-default" %>
<%= f.input :company, :as => :hidden, :input_html => :value => current_user.company %>
</div>
</div>
<% end %>


Controller:



def index
@qandas = Qanda.all
respond_to do |format|
@qandas = Qanda.all
format.html
format.json
end
end

def create
@qanda = current_user.qandas.build(qanda_params)
respond_to do |format|
if @qanda.save!
@qandas = Qanda.all
format.html redirect_to @qanda, notice: 'Qanda was successfully created.'
format.json render :layout => false
else
format.html render :new
format.json render json: @qanda.errors, status: :unprocessable_entity
end
end
end


create.js.erb



$('#qandas').html("<%= j render partial: 'qandas/qanda' %>");
$('#qanda-form').slideUp(350);


new.js.erb



$('#qanda-form').html("<%= j render 'qandas/form' %>");
$('#qanda-form').slideDown(350);


Anybody can see why the Ajax does not kick off please? why am I redirected to the traditional SHOW page please?







ruby-on-rails






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 5:12









Ilya Konyukhov

2,228718




2,228718










asked Nov 9 at 3:26









Etienne

947




947











  • the request you're sending is of js not json so remove format.html and format.json and just write format.js and your instance variable will be available in create.js.erb as well.
    – Gagan Gupta
    Nov 9 at 6:51











  • Hey Gagan, thanks a lot. I made the change and get the following error : ActionController::UnknownFormat Extracted source (around line #38): end end respond_to do |format| @qandas = Qanda.all format.js
    – Etienne
    Nov 9 at 14:15










  • I m sure this must not be difficult, certainly I am missing a small point.
    – Etienne
    Nov 9 at 21:18










  • @GaganGupta, what do you mean by "your instance variable will be available in create.js.erb as well."?
    – Etienne
    Nov 10 at 22:01










  • @qanda and @qandas are instance variables and they'll be available on views as well. Here the view would be create.js.erb. umm, I am posting an answer as I cannot write the code here. just let me know if it is working
    – Gagan Gupta
    Nov 10 at 22:03
















  • the request you're sending is of js not json so remove format.html and format.json and just write format.js and your instance variable will be available in create.js.erb as well.
    – Gagan Gupta
    Nov 9 at 6:51











  • Hey Gagan, thanks a lot. I made the change and get the following error : ActionController::UnknownFormat Extracted source (around line #38): end end respond_to do |format| @qandas = Qanda.all format.js
    – Etienne
    Nov 9 at 14:15










  • I m sure this must not be difficult, certainly I am missing a small point.
    – Etienne
    Nov 9 at 21:18










  • @GaganGupta, what do you mean by "your instance variable will be available in create.js.erb as well."?
    – Etienne
    Nov 10 at 22:01










  • @qanda and @qandas are instance variables and they'll be available on views as well. Here the view would be create.js.erb. umm, I am posting an answer as I cannot write the code here. just let me know if it is working
    – Gagan Gupta
    Nov 10 at 22:03















the request you're sending is of js not json so remove format.html and format.json and just write format.js and your instance variable will be available in create.js.erb as well.
– Gagan Gupta
Nov 9 at 6:51





the request you're sending is of js not json so remove format.html and format.json and just write format.js and your instance variable will be available in create.js.erb as well.
– Gagan Gupta
Nov 9 at 6:51













Hey Gagan, thanks a lot. I made the change and get the following error : ActionController::UnknownFormat Extracted source (around line #38): end end respond_to do |format| @qandas = Qanda.all format.js
– Etienne
Nov 9 at 14:15




Hey Gagan, thanks a lot. I made the change and get the following error : ActionController::UnknownFormat Extracted source (around line #38): end end respond_to do |format| @qandas = Qanda.all format.js
– Etienne
Nov 9 at 14:15












I m sure this must not be difficult, certainly I am missing a small point.
– Etienne
Nov 9 at 21:18




I m sure this must not be difficult, certainly I am missing a small point.
– Etienne
Nov 9 at 21:18












@GaganGupta, what do you mean by "your instance variable will be available in create.js.erb as well."?
– Etienne
Nov 10 at 22:01




@GaganGupta, what do you mean by "your instance variable will be available in create.js.erb as well."?
– Etienne
Nov 10 at 22:01












@qanda and @qandas are instance variables and they'll be available on views as well. Here the view would be create.js.erb. umm, I am posting an answer as I cannot write the code here. just let me know if it is working
– Gagan Gupta
Nov 10 at 22:03




@qanda and @qandas are instance variables and they'll be available on views as well. Here the view would be create.js.erb. umm, I am posting an answer as I cannot write the code here. just let me know if it is working
– Gagan Gupta
Nov 10 at 22:03












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Try updating your code to this and let me know if it's working?



def create
@qanda = current_user.qandas.build(qanda_params)
if @qanda.save!
@qandas = Qanda.all
else
@errors = @qanda.errors
end
end





share|improve this answer




















  • It is working now, there were a few other things to change, you put me in the right direction again. thank you . Last one, do you know why best_in_place does not work on the view generated via AJAX ? It was working when Ajax was broken, now Ajax is fixed and best_in _place no longer works.
    – Etienne
    Nov 10 at 22:26











  • I am glad you got it working, what do you mean by best_in_place ?
    – Gagan Gupta
    Nov 10 at 22:29











  • If you've got time, try to dig deeper why your code wasn't working. format.js expects some arguments. example: format.js render 'create', locals: qanda: @qanda, qandas: @qandas but do it later when you get it working perfectly, not now :D
    – Gagan Gupta
    Nov 10 at 22:32






  • 1




    Sure. It was the good opportunity as well to understand the whole render/remote process.
    – Etienne
    Nov 10 at 22:38










  • what's best_in_place?
    – Gagan Gupta
    Nov 10 at 22:40










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219426%2fajax-not-working-in-rails-same-page-update%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










Try updating your code to this and let me know if it's working?



def create
@qanda = current_user.qandas.build(qanda_params)
if @qanda.save!
@qandas = Qanda.all
else
@errors = @qanda.errors
end
end





share|improve this answer




















  • It is working now, there were a few other things to change, you put me in the right direction again. thank you . Last one, do you know why best_in_place does not work on the view generated via AJAX ? It was working when Ajax was broken, now Ajax is fixed and best_in _place no longer works.
    – Etienne
    Nov 10 at 22:26











  • I am glad you got it working, what do you mean by best_in_place ?
    – Gagan Gupta
    Nov 10 at 22:29











  • If you've got time, try to dig deeper why your code wasn't working. format.js expects some arguments. example: format.js render 'create', locals: qanda: @qanda, qandas: @qandas but do it later when you get it working perfectly, not now :D
    – Gagan Gupta
    Nov 10 at 22:32






  • 1




    Sure. It was the good opportunity as well to understand the whole render/remote process.
    – Etienne
    Nov 10 at 22:38










  • what's best_in_place?
    – Gagan Gupta
    Nov 10 at 22:40














up vote
1
down vote



accepted










Try updating your code to this and let me know if it's working?



def create
@qanda = current_user.qandas.build(qanda_params)
if @qanda.save!
@qandas = Qanda.all
else
@errors = @qanda.errors
end
end





share|improve this answer




















  • It is working now, there were a few other things to change, you put me in the right direction again. thank you . Last one, do you know why best_in_place does not work on the view generated via AJAX ? It was working when Ajax was broken, now Ajax is fixed and best_in _place no longer works.
    – Etienne
    Nov 10 at 22:26











  • I am glad you got it working, what do you mean by best_in_place ?
    – Gagan Gupta
    Nov 10 at 22:29











  • If you've got time, try to dig deeper why your code wasn't working. format.js expects some arguments. example: format.js render 'create', locals: qanda: @qanda, qandas: @qandas but do it later when you get it working perfectly, not now :D
    – Gagan Gupta
    Nov 10 at 22:32






  • 1




    Sure. It was the good opportunity as well to understand the whole render/remote process.
    – Etienne
    Nov 10 at 22:38










  • what's best_in_place?
    – Gagan Gupta
    Nov 10 at 22:40












up vote
1
down vote



accepted







up vote
1
down vote



accepted






Try updating your code to this and let me know if it's working?



def create
@qanda = current_user.qandas.build(qanda_params)
if @qanda.save!
@qandas = Qanda.all
else
@errors = @qanda.errors
end
end





share|improve this answer












Try updating your code to this and let me know if it's working?



def create
@qanda = current_user.qandas.build(qanda_params)
if @qanda.save!
@qandas = Qanda.all
else
@errors = @qanda.errors
end
end






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 10 at 22:11









Gagan Gupta

750317




750317











  • It is working now, there were a few other things to change, you put me in the right direction again. thank you . Last one, do you know why best_in_place does not work on the view generated via AJAX ? It was working when Ajax was broken, now Ajax is fixed and best_in _place no longer works.
    – Etienne
    Nov 10 at 22:26











  • I am glad you got it working, what do you mean by best_in_place ?
    – Gagan Gupta
    Nov 10 at 22:29











  • If you've got time, try to dig deeper why your code wasn't working. format.js expects some arguments. example: format.js render 'create', locals: qanda: @qanda, qandas: @qandas but do it later when you get it working perfectly, not now :D
    – Gagan Gupta
    Nov 10 at 22:32






  • 1




    Sure. It was the good opportunity as well to understand the whole render/remote process.
    – Etienne
    Nov 10 at 22:38










  • what's best_in_place?
    – Gagan Gupta
    Nov 10 at 22:40
















  • It is working now, there were a few other things to change, you put me in the right direction again. thank you . Last one, do you know why best_in_place does not work on the view generated via AJAX ? It was working when Ajax was broken, now Ajax is fixed and best_in _place no longer works.
    – Etienne
    Nov 10 at 22:26











  • I am glad you got it working, what do you mean by best_in_place ?
    – Gagan Gupta
    Nov 10 at 22:29











  • If you've got time, try to dig deeper why your code wasn't working. format.js expects some arguments. example: format.js render 'create', locals: qanda: @qanda, qandas: @qandas but do it later when you get it working perfectly, not now :D
    – Gagan Gupta
    Nov 10 at 22:32






  • 1




    Sure. It was the good opportunity as well to understand the whole render/remote process.
    – Etienne
    Nov 10 at 22:38










  • what's best_in_place?
    – Gagan Gupta
    Nov 10 at 22:40















It is working now, there were a few other things to change, you put me in the right direction again. thank you . Last one, do you know why best_in_place does not work on the view generated via AJAX ? It was working when Ajax was broken, now Ajax is fixed and best_in _place no longer works.
– Etienne
Nov 10 at 22:26





It is working now, there were a few other things to change, you put me in the right direction again. thank you . Last one, do you know why best_in_place does not work on the view generated via AJAX ? It was working when Ajax was broken, now Ajax is fixed and best_in _place no longer works.
– Etienne
Nov 10 at 22:26













I am glad you got it working, what do you mean by best_in_place ?
– Gagan Gupta
Nov 10 at 22:29





I am glad you got it working, what do you mean by best_in_place ?
– Gagan Gupta
Nov 10 at 22:29













If you've got time, try to dig deeper why your code wasn't working. format.js expects some arguments. example: format.js render 'create', locals: qanda: @qanda, qandas: @qandas but do it later when you get it working perfectly, not now :D
– Gagan Gupta
Nov 10 at 22:32




If you've got time, try to dig deeper why your code wasn't working. format.js expects some arguments. example: format.js render 'create', locals: qanda: @qanda, qandas: @qandas but do it later when you get it working perfectly, not now :D
– Gagan Gupta
Nov 10 at 22:32




1




1




Sure. It was the good opportunity as well to understand the whole render/remote process.
– Etienne
Nov 10 at 22:38




Sure. It was the good opportunity as well to understand the whole render/remote process.
– Etienne
Nov 10 at 22:38












what's best_in_place?
– Gagan Gupta
Nov 10 at 22:40




what's best_in_place?
– Gagan Gupta
Nov 10 at 22:40

















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53219426%2fajax-not-working-in-rails-same-page-update%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế