Class: SimpleCms::Page

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/simple_cms/page.rb

Direct Known Subclasses

FullPage

Instance Method Summary collapse

Instance Method Details

#editable?(user) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
17
# File 'app/models/simple_cms/page.rb', line 12

def editable?(user)
  return false if user.nil?
  return true if user.admin?
  return true if users.include?(user)
  false
end