I have two tables, AppTemplate
and AppTemplateMeta
AppTemplate
table has column id
, MetaID
, name
etc.
I have associated these two model like this
class AppTemplate < ActiveRecord::Base
set_table_name 'AppTemplate'
belongs_to :app_template_meta, :class_name => "AppTemplateMeta", :foreign_key => 'MetaID'
end
If we fetch data using AppTemplate.all
, I want associated meta details also. But currently it's not returning associated meta details. It just returns AppTemplate
details.
any guys can help me for this