Reputation: 110960
In a model Feed. is there a way to get the results of a controller call.
class Feed < ActiveRecord::Base
output = ControllerName.Action(params)
Is something like that possible?
Upvotes: 0
Views: 47
Reputation: 4184
You can't (well if you really want to you can, but you shouldnt). Your controller should call a method from your model instead. Another alternative is to create a module and use it as a mixin in both classes.
Upvotes: 2