Rails: What's the best way to handle my lists?
Ok so I'm having a slight problem building my CMS for a client. I want to utilize the same model to handle the photos for their case studies as well as their services. Each has their own model. So the Photo model belongs to a Project or a Service. But in reality it belongs to a project OR a service. Thus I have a problem using acts_as_list.
```ruby class Photo < ActiveRecord::Base belongs_to :service belongs_to :projectacts_as_taggable acts_as_list :scope => :project_id
file_column :image, :magick => { :versions => { “thumb” => “50x50”, “medium” => “640x480>” } } end
<p>If I could do something like:</p>
```ruby
acts_as_list :scope => :project_id || :service_id
Then this would be a piece of cake but it's not that easy. How would you solve this? I know it's not that challenging.