Recently i am upgrading one of my rails app to 3.2.6. It seems
the dafault_scope with options has been deprecated.
i have a scope like this default_scope :include => [:campaign, :site],
:order => :'sites.name' in a relational model campaign_site
which giving this error
Mysql2::Error: Unknown column 'sites.name' in 'order clause': SELECT `campaigns`.* FROM `campaigns` INNER JOIN `campaign_sites` ON `campaigns`.`id` = `campaign_sites`.`campaign_id` WHERE `campaign_sites`.`site_id` = 11377 ORDER BY campaigns.name, sites.name
Any idea how to get around this?
Thanks in advance!
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zdecvl86inwJ.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.