How to search in rails from two models? -


i have 2 models lcities , lservices

class lcity < activerecord::base  has_many :lservices attr_accessible  :lname , :lcode , :lexperience , :lrating , :llocation end 

and

class lservice < activerecord::base belongs_to :lcity    attr_accessible  :lcode , :lscode , :lcharg , :lname end 

i want data searching on llocation of lcities , lname of lservice


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -