Class: Cheat::Controllers::History
- Inherits:
-
R
- Object
- R
- Cheat::Controllers::History
- Includes:
- Responder
- Defined in:
- lib/cheat/site.rb
Instance Method Summary collapse
Methods included from Responder
Instance Method Details
#get(title) ⇒ Object
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/cheat/site.rb', line 194 def get(title) if sheets = Sheet.detect { |s| s.title == title } @sheets = sheets.find_versions(:order => 'version DESC') end respond_to do |wants| wants.html { render :history } wants.yaml { { @sheets.first.title => @sheets.map(&:version) }.to_yaml } end end |