Hi,
We're using Rails 2.2.2 with ActiveScaffold 1.2.
We're using DB2 on the backend.
I have this in my controller
...
active_scaffold :category do |c|
c.list.columns = [:position, :name, :code, :categories]
list.sorting = {:position => 'asc'} # <=== CAUSING ERROR
...
end
...
And it's producing this SQL:
SELECT O.* FROM (SELECT I.*, ROW_NUMBER() OVER () sys_row_num FROM
(SELECT DISTINCT category.category_id FROM category WHERE
(category.exercise_id = 100) ORDER BY category.position ASC) AS I) AS
O WHERE sys_row_num BETWEEN 1 AND 15
The following clause from the SQL is invalid as it's trying to sort on
the position field which is not in the result set
SELECT DISTINCT category.category_id
FROM category
WHERE (category.exercise_id = 100)
ORDER BY category.position ASC
This all worked fine under Rails 2.1, with ActiveScaffold 1.1.1, and
list.sorting {:position =< 'asc'} continues to work fine every else
we're using it.
Any suggestions on this?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---