ruby on rails - StaticModel::Base undefined method column_names -


i have class region extended staticmodel::base. set data function

set_data_file 'db/static/regions.yml' 

yes, want - have static model. , have access data

region.find(1) 

it work.

but need register class.

activeadmin.register region ... end 

and have error - 'undefined method column_names'. add method column_names, source code activerecord's, not resolve problem because have errors (undefined method reorder , on) added methods activerecord until have error (undefined method ransack).

but when call normal objects activerecord have:

city(id: integer, name: string ...) 

and when call class region have

region 

and can use find method - , work.

and when call region.first have:

<region:0x007fc6e35028d0 @attributes={"active"=>true ... }, @id=1> 

thanks


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -