yes do you have this in your Gemfile : gem 'jquery-rails' ?
and also have you run this command : ' rails g jquery:install ' , to
install jquery require file ?
On 21 août, 22:27, Paul Bergstrom li...@ruby-forum.com wrote:
lionel first-developer wrote in post #1017744:
@Paul Bergstrom :
7stud -- wrote in post #1017753:
This is what I've been doing for jquery:
jquery.rails.js
Thank you. Now it works. :-)
So I've been sitting with this problem for a long time and this was what
I missed. Did I miss it or was it poorly explained?
--
Posted via http://www.ruby-forum.com/.
--
Paul Bergstrom wrote in post #1017792:
7stud -- wrote in post #1017753:
This is what I've been doing for jquery:
jquery.rails.js
Thank you. Now it works. :-)
So I've been sitting with this problem for a long time and this was what
I missed. Did I miss it or was it poorly explained?
I
Eric Björkvall eric.bjorkv...@gmail.com wrote in post #1013626:
One way:
link_to #, new_comment_path, :remote = true, :id =
new-comment-link
new.js.erb
$(#new-comment-link).hide();
$('#commentlist').html('%= render :partial = comments %')
You can use ruby logic in the .js.erb file -
On 21 August 2011 10:59, Paul Bergstrom li...@ruby-forum.com wrote:
Eric Björkvall eric.bjorkv...@gmail.com wrote in post #1013626:
One way:
link_to #, new_comment_path, :remote = true, :id =
new-comment-link
new.js.erb
$(#new-comment-link).hide();
$('#commentlist').html('%= render
On Aug 21, 8:03 pm, Paul Bergstrom li...@ruby-forum.com wrote:
Colin Law wrote in post #1017722:
So how do I make a basic ajax call from a link, do something in an
action and update a div with new content?
If you want to follow the jqueryish way, then you setup a click
handler on the link
@Paul Bergstrom :
In rails 3, handleling an Ajax request is too easy with Ujs. I'll try to
give you a good example.
I suppose, i want to 'activate' post an article via an Ajax call :
I have :
- posts_controller
- Route match for activating in Routes.rb file
- Views/posts/ directory
This is what I've been doing for jquery:
layouts/application.html.erb:
!DOCTYPE html
html
head
title%= @title %/title
%= csrf_meta_tag %
%=
javascript_include_tag(
http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js;,
jquery.rails.js
)
%
Then go here:
Railscasts has some examples:
http://railscasts.com/episodes/43-ajax-with-rjs
http://railscasts.com/episodes/136-jquery
On 27 jul, 08:45, Paul Bergstrom li...@ruby-forum.com wrote:
How do I make an ajax call and then update a div with a partial? I've
tried this but it's not working. Comment is
One way:
link_to #, new_comment_path, :remote = true, :id =
new-comment-link
new.js.erb
$(#new-comment-link).hide();
$('#commentlist').html('%= render :partial = comments %')
You can use ruby logic in the .js.erb file - just like you could in
former .rjs files.
% if @condition %
Why don't you use remote_function() ?
- Chirag Shah
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from
Chirag Shah wrote in post #1013312:
Why don't you use remote_function() ?
- Chirag Shah
I used to do that but now I'm trying to do it with jquery.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk
For work with jquery and rails function you can use jrails plugin
- Chirag Shah
Paul Bergstrom wrote in post #1013320:
Chirag Shah wrote in post #1013312:
Why don't you use remote_function() ?
- Chirag Shah
I used to do that but now I'm trying to do it with jquery.
--
Posted via
13 matches
Mail list logo