if the HAML is:

    .class1
      .class2
        .class3
          %div
            content... many lines

How can it be made so that it doesn't respond with class1 and class2 if
it is Ajax?

    - if !request.xhr?
      .class1
        .class2

    .class3
      %div
        content... many lines

won't work, because if not Ajax, then class3 is not a child of class2.
It might have to be something like

    - if !request.xhr?
      .class1
        .class2
          .class3
            %div
              content... many lines
    - else
      .class3
        %div
          content... many lines

and it is repeating a lot of code.  Can it be structure within the same
file?  Or the second part made into a partial?
-- 
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 [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