blob: 87b26efd572bedcac9520a103aefdeca4909da84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
class RouteElement < ActiveRecord::Base
ELEMENT_ACTIONS = ['none', 'match', 'not_match', 'set']
attr_accessible :call_route_id, :var_in, :var_out, :pattern, :replacement, :action, :mandatory, :position
belongs_to :call_route
acts_as_list :scope => :call_route
validates :action,
:presence => true,
:inclusion => { :in => ELEMENT_ACTIONS }
def to_s
"#{var_in} #{var_out}"
end
end
|