how about this way?
'''
module UnionHack
def union(relations)
from '((' + relations.map { |r| r.ast.tosql }.join(') UNION (') + ')) AS ' + self.tablename
end
end
'''
and, in your method "my_timeline" you should not do "Profile.union..." but "Event.union..."?
Achievements
19
Karma
0
Total ProTip Views
Mongoose
Have at least one original repo where Ruby is the dominant language
Charity
Fork and commit to someone's open source project in need
how about this way?
'''
module UnionHack
def union(relations)
from '((' + relations.map { |r| r.ast.tosql }.join(') UNION (') + ')) AS ' + self.tablename
end
end
'''
and, in your method "my_timeline" you should not do "Profile.union..." but "Event.union..."?