Method: Form#get_unique

Defined in:
lib/bull/ui_core.rb

#get_unique(kw) ⇒ Object



701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
# File 'lib/bull/ui_core.rb', line 701

def get_unique kw
  k, selected = kw.shift
  @selected = selected
  selected.add_form self
  @rvs = reactive(selected) do
    @dirty.each {|attr| state.__send__('dirty_' + attr+'!', false)}
    @dirty.clear
    clear
    $controller.rpc('get_unique_' + @@table, k, selected.value).then do|response|
      response.each do |k, v|
        state.__send__(k+'!', v)
      end
    end
  end
end