Sha256: 79768dee638d8ee3d0a745d3ae1e35614fed241f7e654b2e8f024d3ada805ba6

Contents?: true

Size: 753 Bytes

Versions: 10

Compression:

Stored size: 753 Bytes

Contents

def followable?
  false
end

def history?
  false
end

format do
  view :not_found do |args|
    if update_machine_output_live?
      Card::Cache.reset_global # FIXME - wow, this kind of hard core, no?
      root.error_status = 302
      card.left.update_machine_output
      card_path card.left.machine_output_url
    else
      super args
    end
  end

  def update_machine_output_live?
    said = card.selected_action_id
    card.left.kind_of? Machine and                                  # must be a machine
    !card.left.locked?         and                                  # machine must not already be running
    ( card.new_card? or !said or said == card.last_action_id )      # must want current output (won't re-output old stuff)
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
card-1.16.14 mod/03_machines/set/right/machine_output.rb
card-1.16.13 mod/03_machines/set/right/machine_output.rb
card-1.16.12 mod/03_machines/set/right/machine_output.rb
card-1.16.11 mod/03_machines/set/right/machine_output.rb
card-1.16.10 mod/03_machines/set/right/machine_output.rb
card-1.16.9 mod/03_machines/set/right/machine_output.rb
card-1.16.8 mod/03_machines/set/right/machine_output.rb
card-1.16.7 mod/03_machines/set/right/machine_output.rb
card-1.16.6 mod/03_machines/set/right/machine_output.rb
card-1.16.5 mod/03_machines/set/right/machine_output.rb