Module: Pageflow::EntryPublicationStates::ClassMethods

Defined in:
app/models/concerns/pageflow/entry_publication_states.rb

Instance Method Summary collapse

Instance Method Details

#with_publication_state(state) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
# File 'app/models/concerns/pageflow/entry_publication_states.rb', line 58

def with_publication_state(state)
  case state
  when 'published_with_password_protection'
    published_with_password_protection
  when 'published_without_password_protection'
    published_without_password_protection
  when 'not_published'
    not_published
  else
    fail(ArgumentError, "Unknown publication state #{state}")
  end
end