Sha256: 2cbcc3b74c12ac55b5771c9ca97bfb46fb59db486627593421542a45abb1f0bf
Contents?: true
Size: 689 Bytes
Versions: 12
Compression:
Stored size: 689 Bytes
Contents
# This model is not actually backed by the database, but conveniently collects all the changelog entries as models require 'will_paginate/array' # because model not backed by database, model returns arrays instead of ActiveRecord Relations class Changelog < ActiveRecord::Base attr_accessor :title, :content def initialize(title,content) @title = title @content = content end def self.all changelogs = IO.read(File.expand_path("../../../../../CHANGELOG.md",__FILE__)).split(/^## /).map{|str| Changelog.new(str.split(/$/,2)[0],str.split(/$/,2)[1])} changelogs.slice!(0) changelogs end def self.paginate(options={}) self.all.paginate(options) end end
Version data entries
12 entries across 12 versions & 1 rubygems