How to fix Ransack undefined method “_eq”, when using ActiveAdmin

673 views Asked by At
NoMethodError in Admin::Transacoes#index
Showing /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-0ac35b7ff052/app/views/active_admin/resource/index.html.arb where line #2 raised:

undefined method `cliente_id_eq' for #<Ransack::Search:0x00000004e964a8>

There is a pattern "_eq" for each undefined method :

class Cliente < ActiveRecord::Base
self.table_name = "cliente"
self.primary_key = 'Cod_Cliente'
has_many :transacao

end

class Transacao < ActiveRecord::Base
  self.table_name = "transacao"
  self.primary_key = 'Numero_Transacao'
  belongs_to :cliente
  belongs_to :funcionario
  belongs_to :aluguel
end

I'm using rails with a ready-made database running in another (remote) application and fields are no default of rails

any ideas?

0

There are 0 answers