about summary refs log tree commit diff stats
path: root/data/maps/the_ancient/connections.txtpb
blob: 23989ab1fcb40dc7dadaeb66a89cb7154a372ecc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
connections {
  from_room: "Outside"
  to_room: "Inside"
  door { name: "Front Door" }
}
connections {
  from_room: "Inside"
  to_room: "Ending"
  door { name: "End Door" }
}
/span>include Recordable acts_as_taggable validates :title, presence: true validates :body, presence: true, if: :published validates :slug, presence: true, format: /\A[-a-z0-9]+\z/, if: :published before_validation :set_draft_title before_save :set_published_at def path "/says/#{slug}" end def taggable self end private def set_draft_title if self.title.blank? and not self.published self.title = "Untitled draft" end end def set_published_at if self.published if self.published_at.blank? self.published_at = DateTime.now end else self.published_at = nil end end end