I have a SQL query that isn\'t table-specific and I don\'t know how to handle it with Ruby On Rails.
Here my SQL query (you don\'t need to understand it):
SELE
If you want to create classes (models) that are not backing to a database you need to not state that they are inheriting from ActiveRecord.
Do
class RecentActivity
Instead of
class RecentActivity < ActiveRecord::Base
That being said, it still might be helpful to get some more information on what you are trying to do: for example if you want to have something like "comments" or "pictures" on multiple different things like an article, or someones profile or blogpost all within the same application, I'd recommend checking out PolyMorphic Associations.