Module: Pageflow::EntryPublicationStates::ClassMethods

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

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Instance Method Details

#with_publication_state(state) ⇒ Object



62
63
64
65
66
67
68
69
70
71
72
73
# File 'app/models/concerns/pageflow/entry_publication_states.rb', line 62

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
    raise(ArgumentError, "Unknown publication state #{state}")
  end
end