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



49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/concerns/pageflow/entry_publication_states.rb', line 49

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