I have a model:
class Item < ActiveRecord::Base
The item has the 'store' property
Based on the value of the store, I would like the Item object to have different behavior for certain methods.
Is there a common design pattern for Rails? How is this done purely without a large if-else statement in methods?
source share