core/rails/app/controllers/application_controller.rb
# Common match method.  It is basically identical for every controller
Common match method.  It is basically identical for every controller
Common match method . It is basically identical for every controller
def match
    attrs = self.model.attribute_names.map{|a|a.to_sym}
    ok_params = params.permit(attrs)
    objs = ok_params.empty? ? model.where('false') : visible(self.model,cap("READ")).where(ok_params)
    respond_to do |format|
      format.html { }
      format.json { render api_index(self.model, objs) }
    end
  end
def match attrs = self . model . attribute_names . map { | a | a . to_sym } ok_params = params . permit ( attrs ) objs = ok_params . empty? ? model . where ( 'false' ) : visible ( self . model , cap ( "READ" ) ) . where ( ok_params ) respond_to do | format | format . html { } format . json { render api_index ( self . model , objs ) } end end
Common match method.
Common match method .