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

Question
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?


Show source
| ruby   | rubygems   | ruby-on-rails   | activeadmin   | ransack   2016-12-31 02:12 0 Answers

Answers ( 0 )

◀ Go back