Class: Junebug::Models::Page

Inherits:
Base
  • Object
show all
Defined in:
lib/junebug/models.rb

Defined Under Namespace

Classes: Version

Constant Summary collapse

PAGE_TITLE =

camping error on initial load

'[\w0-9A-Za-z -]+'
PAGE_SLUG =

We need the w for other UTF chars

PAGE_TITLE.gsub(/ /, '_')
DENY_UNDERSCORES =
/^([^_]+)$/
/\[\[(#{PAGE_TITLE})[|]?([^\]]*)\]\]/

Instance Method Summary collapse

Instance Method Details

#title=(text) ⇒ Object



46
47
48
# File 'lib/junebug/models.rb', line 46

def title=(text)
  write_attribute(:title, text ? text.strip.squeeze(' ') : text)
end

#title_urlObject



50
51
52
# File 'lib/junebug/models.rb', line 50

def title_url
  title.gsub(/\s/,'_')
end