title: How to design different 'views' of a model RESTfully?
body: <p>By 'view' here I mean different combinations of properties of the model, not the view of the traditional MVC. For example, I have the following model:</p>
  
  <pre><code>class Game &lt; ActiveRecord::Base
    has_many :players
    belongs_to :status
    has_one :deck
    has_many :turns
    has_one :current_turn, :class_name =&gt; 'Turn', :conditions =&gt; ['turn_num = ?', '#{self.turn_num}']
  end
  </code></pre>
  
  <p>I've written a <code>full_xml</code> method for Game that I use for the 'normal' get operation, so that I can include certain properties of players and current_turn, and then I don't have to do GETs on every player all the time. I also don't want to include ALL the properties and children and children's properties of the Game model on every GET</p>
  
  <p>Now, however, I want to GET a game history, which is all the turns (and their properties/children). Initially I thought of a new model w/out a corresponding table, and then realized that wasn't necessary because the data and relationships are already there in the game and turns models. I also thought about writing a new action, but I thought I read somewhere that in the RESTful world, you shouldn't be writing any actions other than the core 7.</p>
  
  <p>BTW, I'm thinking here of returning xml, because I'm using a Flex front end instead of rails views.</p>