Sha256: e0882d3788c581f994972d4e48989bd4a1dc396632095a5eb77e85efc66d5354
Contents?: true
Size: 668 Bytes
Versions: 7
Compression:
Stored size: 668 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 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
7 entries across 7 versions & 1 rubygems