Fix ascending ordering exception
Fix ascending ordering exception

For distinct and order together in active record, for acending,
we can either send Arel::Nodes::NamedFunction, which will
just do ORDER BY without direction, which will default to ASC.
Or we can send Arel::Nodes::Ascending, which will do ORDER BY
ASC.

Right now, for columns other than :string, :text, we were sending
only Arel::Attributes::Attribute, which will blow up in
active_record, when it tries to call to_sql on itself.

Best solution seems to be to always send Arel::Nodes::Ascending,
when we order in that direction.

Fixes BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1333137

syncrou/manageiq,mfeifer/manageiq,d-m-u/manageiq,jrafanie/manageiq,israel-hdez/manageiq,lpichler/manageiq,jntullo/manageiq,hstastna/manageiq,djberg96/manageiq,ailisp/manageiq,gerikis/manageiq,jameswnl/manageiq,jrafanie/manageiq,borod108/manageiq,mresti/manageiq,ManageIQ/manageiq,ilackarms/manageiq,tzumainn/manageiq,ilackarms/manageiq,romaintb/manageiq,skateman/manageiq,pkomanek/manageiq,borod108/manageiq,d-m-u/manageiq,billfitzgerald0120/manageiq,branic/manageiq,ailisp/manageiq,fbladilo/manageiq,pkomanek/manageiq,mresti/manageiq,gmcculloug/manageiq,mkanoor/manageiq,jameswnl/manageiq,ManageIQ/manageiq,syncrou/manageiq,lpichler/manageiq,tinaafitz/manageiq,gmcculloug/manageiq,agrare/manageiq,durandom/manageiq,skateman/manageiq,maas-ufcg/manageiq,branic/manageiq,jrafanie/manageiq,mfeifer/manageiq,mzazrivec/manageiq,israel-hdez/manageiq,aufi/manageiq,aufi/manageiq,syncrou/manageiq,djberg96/manageiq,tzumainn/manageiq,billfitzgerald0120/manageiq,ManageIQ/manageiq,NickLaMuro/manageiq,borod108/manageiq,ManageIQ/manageiq,ailisp/manageiq,kbrock/manageiq,juliancheal/manageiq,gmcculloug/manageiq,yaacov/manageiq,tinaafitz/manageiq,borod108/manageiq,pkomanek/manageiq,djberg96/manageiq,israel-hdez/manageiq,aufi/manageiq,ilackarms/manageiq,josejulio/manageiq,billfitzgerald0120/manageiq,KevinLoiseau/manageiq,mzazrivec/manageiq,matobet/manageiq,josejulio/manageiq,jameswnl/manageiq,d-m-u/manageiq,pkomanek/manageiq,matobet/manageiq,skateman/manageiq,maas-ufcg/manageiq,chessbyte/manageiq,romaintb/manageiq,jntullo/manageiq,gerikis/manageiq,NaNi-Z/manageiq,gerikis/manageiq,jameswnl/manageiq,NickLaMuro/manageiq,josejulio/manageiq,yaacov/manageiq,jntullo/manageiq,israel-hdez/manageiq,aufi/manageiq,mkanoor/manageiq,mresti/manageiq,KevinLoiseau/manageiq,lpichler/manageiq,chessbyte/manageiq,jvlcek/manageiq,fbladilo/manageiq,tzumainn/manageiq,maas-ufcg/manageiq,KevinLoiseau/manageiq,KevinLoiseau/manageiq,maas-ufcg/manageiq,hstastna/manageiq,yaacov/manageiq,KevinLoiseau/manageiq,durandom/manageiq,matobet/manageiq,romaintb/manageiq,jvlcek/manageiq,NickLaMuro/manageiq,mzazrivec/manageiq,romanblanco/manageiq,agrare/manageiq,branic/manageiq,romanblanco/manageiq,andyvesel/manageiq,mzazrivec/manageiq,NaNi-Z/manageiq,billfitzgerald0120/manageiq,agrare/manageiq,yaacov/manageiq,kbrock/manageiq,romanblanco/manageiq,djberg96/manageiq,jrafanie/manageiq,juliancheal/manageiq,juliancheal/manageiq,NickLaMuro/manageiq,romaintb/manageiq,andyvesel/manageiq,durandom/manageiq,mkanoor/manageiq,jntullo/manageiq,andyvesel/manageiq,ailisp/manageiq,hstastna/manageiq,ilackarms/manageiq,matobet/manageiq,hstastna/manageiq,chessbyte/manageiq,gmcculloug/manageiq,romaintb/manageiq,romaintb/manageiq,gerikis/manageiq,mresti/manageiq,fbladilo/manageiq,skateman/manageiq,NaNi-Z/manageiq,lpichler/manageiq,jvlcek/manageiq,mfeifer/manageiq,juliancheal/manageiq,NaNi-Z/manageiq,maas-ufcg/manageiq,branic/manageiq,KevinLoiseau/manageiq,mkanoor/manageiq,mfeifer/manageiq,romanblanco/manageiq,fbladilo/manageiq,syncrou/manageiq,jvlcek/manageiq,josejulio/manageiq,tzumainn/manageiq,tinaafitz/manageiq,agrare/manageiq,kbrock/manageiq,durandom/manageiq,chessbyte/manageiq,maas-ufcg/manageiq,andyvesel/manageiq,tinaafitz/manageiq,d-m-u/manageiq,kbrock/manageiq