Hypothetical Question about Views

I have a hunch, however, that separate mime types for different views is inappropriate, or is this good? Any thoughts?

Sounds like a needless complication to me - I don't see what this buys you.

Fred

Frederick Cheung wrote:

If it is 3 views of the same data, then the controller could just look at a params[:which_format] value to determine where to route the view for rendering.

Creating mime types for different views *all destined for the same recipient format* is, in my opinion, an inappropriate use of the mime types.

And just a niggle... Thing.all implies you are retrieving @things, plural.

Frederick Cheung wrote:

How do you deal with wanting three different views for the same data? Do you use three separate controller actions?

I would. Sounds like it would be clearer than fiddling with respond_to. Obviously you'd want to share the data generation stuff between the various actions.

Fred