This is purely for curiosity's sake:

If I have a simple controller method:

def index
  @thing = Thing.all

  respond_to do |format|
    format.js
  end
end

And I'd like to call the 'index' controller method from three different
locations, all with AJAX, to return three entirely different views.

Currently I use this:

def index
  @thing = Thing.all

  respond_to do |format|
    format.first_view
    format.second_view
    format.third_view
  end
end

I have a hunch, however, that separate mime types for different views is
inappropriate, or is this good? Any thoughts?
-- 
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