assume 2 records in members table
assume 1st from members has an event, the other doesn't
this
Member.report_table(:first, :only => [:login], :include => {:events =>
{:only => [:title]}})
returns both login and event.title columns
BUT
this
Member.report_table(:all, :only => [:login], :include => {:events =>
{:only => [:title]}})
returns only the login for Member (b/c the other record in members
doesn't have an event associated)
i can fix it by using a transform, but i'm writing a reporting system
for ppl to compose their own reports (so, they're generated on the
fly), and although i could make it work using transform, it sounds
like a lot of spaghetti code for something i assume ruport handles
already (and i just haven't figured it out).
> assume 2 records in members table > assume 1st from members has an event, the other doesn't
> this > Member.report_table(:first, :only => [:login], :include => {:events => > {:only => [:title]}}) > returns both login and event.title columns
> BUT > this > Member.report_table(:all, :only => [:login], :include => {:events => > {:only => [:title]}}) > returns only the login for Member (b/c the other record in members > doesn't have an event associated)
Should work as a gem with GitHub as a source (ruport-acts_as_reportable I guess), vendor'd in Rails, or just requiring the single lib file directly!
Please let me know if this fixes your issue and doesn't break any other reports you may have. If so, I will aim to get this released into the proper gem repository next week as the fix has been lingering around for quite a while now.
> > assume 2 records in members table
> > assume 1st from members has an event, the other doesn't
> > this
> > Member.report_table(:first, :only => [:login], :include => {:events =>
> > {:only => [:title]}})
> > returns both login and event.title columns
> > BUT
> > this
> > Member.report_table(:all, :only => [:login], :include => {:events =>
> > {:only => [:title]}})
> > returns only the login for Member (b/c the other record in members
> > doesn't have an event associated)
> Should work as a gem with GitHub as a source (ruport-acts_as_reportable
> I guess), vendor'd in Rails, or just requiring the single lib file directly!
> Please let me know if this fixes your issue and doesn't break any other
> reports you may have. If so, I will aim to get this released into the
> proper gem repository next week as the fix has been lingering around for
> quite a while now.
> > assume 2 records in members table
> > assume 1st from members has an event, the other doesn't
> > this
> > Member.report_table(:first, :only => [:login], :include => {:events =>
> > {:only => [:title]}})
> > returns both login and event.title columns
> > BUT
> > this
> > Member.report_table(:all, :only => [:login], :include => {:events =>
> > {:only => [:title]}})
> > returns only the login for Member (b/c the other record in members
> > doesn't have an event associated)
> Should work as a gem with GitHub as a source (ruport-acts_as_reportable
> I guess), vendor'd in Rails, or just requiring the single lib file directly!
> Please let me know if this fixes your issue and doesn't break any other
> reports you may have. If so, I will aim to get this released into the
> proper gem repository next week as the fix has been lingering around for
> quite a while now.