class Engine2::DecodeEntryAction
Public Instance Methods
invoke(handler)
click to toggle source
# File lib/engine2/action/decode.rb, line 120 def invoke handler {entries: invoke_decode(handler, handler.param_to_json(:ids))} end
invoke_decode(handler, ids)
click to toggle source
# File lib/engine2/action/decode.rb, line 124 def invoke_decode handler, ids records = get_query.where(ids.map{|keys| Hash[assets[:model].primary_keys.zip(keys)]}.reduce{|q, c| q | c}).load_all # handler.halt_not_found(LOCS[:no_entry]) if records.empty? records end
post_run()
click to toggle source
Calls superclass method
Engine2::DecodeAction#post_run
# File lib/engine2/action/decode.rb, line 130 def post_run super if assoc = assets[:assoc] decode = assoc[:model].type_info[assoc[:keys].first][:decode] if decode[:search][:multiple] && node.parent.parent.*.is_a?(ListAction) node.list.*.menu(:panel_menu).option :choose, icon: :ok #, disabled: "action.selected_size() == 0" node.list.*.menu(:panel_menu).option :cancel, icon: "remove" end end end