Sha256: 555816511125e09cf640afba4c138c8bd6cff235f172a586e644d820ce0d8b58

Contents?: true

Size: 337 Bytes

Versions: 32

Compression:

Stored size: 337 Bytes

Contents

class Pulitzer::PostTypeVersionsController::ChangeState

  def initialize(ptv,state_change)
    @ptv, @state_change = ptv, state_change.to_sym
  end

  def call
    sanitize_state_change or return false
    @ptv.send @state_change
  end

  def sanitize_state_change
    return [:publish,:retire,:preview].include? @state_change
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
pulitzer-0.15.31 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.30 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.29 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.28 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.27 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.26 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.25 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.24 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.23 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.22 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.21 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.20 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.19 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.18 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.17 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.16 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.15 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.14 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.13 app/interactions/pulitzer/post_type_versions_controller/change_state.rb
pulitzer-0.15.12 app/interactions/pulitzer/post_type_versions_controller/change_state.rb