module GollumRails::Persistance::ClassMethods
Public Instance Methods
create(data)
click to toggle source
first creates an instance of itself and executes the save function.
data - Hash containing the page data
Returns an instance of Gollum::Page or false
# File lib/gollum_rails/persistance.rb, line 15 def create(data) page = self.new(data) page.save end
create!(data)
click to toggle source
calls `create` on current class. If returned value is nil an exception will be thrown
data - Hash of Data containing all necessary stuff TODO write this stuff
Returns an instance of Gollum::Page
# File lib/gollum_rails/persistance.rb, line 27 def create!(data) page = self.new(data) page.save! end