Class: Junebug::Controllers::Versions

Inherits:
R
  • Object
show all
Defined in:
lib/junebug/controllers.rb

Instance Method Summary collapse

Instance Method Details

#get(page_name) ⇒ Object



101
102
103
104
105
106
107
# File 'lib/junebug/controllers.rb', line 101

def get page_name
  page_name_spc = page_name.gsub(/_/,' ')
  @page = Page.find_by_title(page_name_spc)
  @versions = @page.find_versions(:order => 'version DESC', :include => [:user])
  @page_title = "Version History: #{page_name_spc}"
  render :versions
end