Skip to content

Wrong order of collection items for select #593

@rivella50

Description

@rivella50

Hi,
i know this issue has been addressed many times, but i still do not see a solution:
When using the following column code in ActiveAdmin the order of the items does not represent my order given in the select statement (it is reordered later after the id keys):

column 'sector' do |i|
    best_in_place i, :sector_id, as: :select, url: admin_sector_path(i), :collection => Sector.order('name asc').map { |f| [f.id, f.name] }
end

Is there a possibility not to allow a reordering for the array given to the collection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions