S
S
ssh02010-11-28 19:04:09
JavaScript
ssh0, 2010-11-28 19:04:09

Ruby on Rails 3 - Ajax preloader?

Good evening! Tell me the rails way to create ajax page content loading, for example, there is a template with a list of products, and until it is loaded, we show the loading indicator. Thanks for answers!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AzaLess, 2010-11-28
@AzaLess

when requesting "Next" for a list of products:
<%= link_to_remote "next",
:url => {:controller => "your_controller",
:action => "your_action",
:some_var => "var_value",
},
:html =>{:id => film.id,
:name => "hide_me"},
:method => :post,
:before => "$('#process_pic').show()",
:complete => " $('#process_pic').hide();"
%>

A
AzaLess, 2010-11-28
@AzaLess

I work with Rails - but I haven’t seen a special rails way. Just in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question