Instiki 0.16.3: Rails 2.3.0
Instiki now runs on the Rails 2.3.0 Candidate Release. Among other improvements, this means that it now automagically selects between WEBrick and Mongrel. Just run ./instiki --daemon
This commit is contained in:
parent
43aadecc99
commit
4e14ccc74d
893 changed files with 71965 additions and 28511 deletions
|
@ -1,3 +1,5 @@
|
|||
require 'active_model/state_machine/state_transition'
|
||||
|
||||
module ActiveModel
|
||||
module StateMachine
|
||||
class Event
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
require 'active_model/state_machine/state'
|
||||
require 'active_model/state_machine/event'
|
||||
|
||||
module ActiveModel
|
||||
module StateMachine
|
||||
class Machine
|
||||
attr_accessor :initial_state, :states, :events, :state_index
|
||||
attr_writer :initial_state
|
||||
attr_accessor :states, :events, :state_index
|
||||
attr_reader :klass, :name
|
||||
|
||||
def initialize(klass, name, options = {}, &block)
|
||||
|
@ -71,4 +75,4 @@ module ActiveModel
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,11 +5,8 @@ module ActiveModel
|
|||
|
||||
def initialize(name, options = {})
|
||||
@name = name
|
||||
machine = options.delete(:machine)
|
||||
if machine
|
||||
machine.klass.send(:define_method, "#{name}?") do
|
||||
current_state.to_s == name.to_s
|
||||
end
|
||||
if machine = options.delete(:machine)
|
||||
machine.klass.define_state_query_method(name)
|
||||
end
|
||||
update(options)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue