I have a model named "Post" with following attributes:
class Post < ActiveRecord::Base
attr_accessible :content, :published_at, :status, :title, :type, :user_id
has_many :entity_categories
has_many :entity_pages
end
A post have type
field that specifies type of post (e.g. Regular, News, ...).
And I want to use multiple controllers and views with this model (News should use different template and logic from Regular post).
For example, if type == regular
it must uses controller named CommonPost
and its templates.
How can I solve this problem?