Do you have anything pertinent/related/involved in the application.js
file?  Try pulling that out as you could be having a failure in JS
that's causing grief.  Also -- check your console in Firebug (or
whatever you're using) and see if errors are being thrown when the
page loads.


On Dec 16, 1:19 am, loominator1970 <[email protected]> wrote:
> Yep, i've done that, too.  Here's the header of the 'rails.js' version
> i'm using
>
> /*
>  * jquery-ujs
>  *
>  *http://github.com/rails/jquery-ujs/blob/master/src/rails.js
>  *
>  * This rails.js file supports jQuery 1.4.3 and 1.4.4 .
>  *
>  */
>
> On Dec 15, 11:08 pm, Rob Biedenharn <[email protected]>
> wrote:
>
>
>
>
>
>
>
> > On Dec 16, 2010, at 12:48 AM, loominator1970 wrote:
>
> > > Yes I am, here's what I have in the application.html.erb view, and
> > > they are all in my javascript folder
>
> > > <%= javascript_include_tag 'jquery-1.4.3.js', 'rails', 'application'
> > > %>
>
> > Ah, but have you replaced rails.js with the jquery version?
>
> > curl -Ohttps://github.com/rails/jquery-ujs/raw/master/src/rails.js
>
> > see the README athttp://github.com/rails/jquery-ujsformore details.
>
> > -Rob
>
> > > On Dec 15, 10:30 pm, Ray Parker <[email protected]> wrote:
> > >> Are you including rails.js?
>
> > >> On Dec 16, 12:16 am, loominator1970 <[email protected]> wrote:
>
> > >>> This seems like it should be pretty straightforward, but its  
> > >>> stumping
> > >>> me.  I have a small form that I am trying to submit using jquery  
> > >>> that
> > >>> is supposed to remove an association between to HABTM models.  For  
> > >>> the
> > >>> sake of argument, the models are Course and Student.
>
> > >>> # view
> > >>>      <%= form_tag ( remove_student_from_course_path, :remote =>  
> > >>> true )
> > >>> %>
> > >>>         <%= hidden_field_tag "course_id", @course.id %>
> > >>>         <%= hidden_field_tag "student_id", @student.id %>
> > >>>      <%= submit_tag 'Remove' %>
>
> > >>> # controller
> > >>>   def remove_student_from_class
> > >>>     @student = Student.find(params[:student_id])
> > >>>     @msg = Factor.method_to_remove_student_from_class(params)
>
> > >>>     respond_to do |format|
> > >>>         format.html { redirect_to edit_class_path(@class) }
> > >>>         format.js
> > >>>     end
> > >>>   end
>
> > >>> # remove_student_from_class.js.erb
> > >>> // reload the page
> > >>> location.reload();
>
> > >>> Everything works fine, except the HTML code is generated and not the
> > >>> JS code in the respond_to block.  I would expect the JS call to get
> > >>> fired since I have the ':remote => true' line in there, but its  
> > >>> always
> > >>> the HTML and it generates the page.  What am I overlooking?
>
> > >>> Dave
>
> > Rob Biedenharn          
> > [email protected]        http://AgileConsultingLLC.com/
> > [email protected]          http://GaslightSoftware.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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to