94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# File 'lib/engine2/action_node.rb', line 94
def nodes_info handler
info = nodes.reduce({}) do |h, (name, a)|
action = a.*
act = {
action_type: action.action_type,
method: action.http_method,
number: a.number,
terminal: a.nodes.empty?,
meta: !action.meta.empty?
}
act[:access] = true if !recheck_access && a.check_access!(handler)
act[:recheck_access] = true if a.recheck_access
if Handler::development?
act[:action_class] = action.class
act[:access_block] = a.access_block if a.access_block
act[:model] = action.assets[:model]
end
h[name] = act
h
end
info.first[1][:default] = true unless nodes.empty?
info
end
|