Skip to content

Commit

Permalink
order should not be needed to be changed, and detect association orde…
Browse files Browse the repository at this point in the history
…r is harder in rails4 because scopes can be used
  • Loading branch information
scambra committed Oct 18, 2013
1 parent aa31a03 commit e9faeac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ActiveSupport::Deprecation.warn "Relying on @record to render form_asssociation partial with no parent_record local variable is deprecated", caller(1) unless local_assigns[:parent_record]
parent_record ||= @record # save @record, some partial can change @record TODO remove when changing @record is removed
associated = column.singular_association? ? [parent_record.send(column.name)].compact : parent_record.send(column.name).to_a
associated = associated.sort_by {|r| r.new_record? ? 99999999999 : r.id} unless column.association.options.has_key?(:order)
#associated = associated.sort_by {|r| r.new_record? ? 99999999999 : r.id} unless column.association.options.has_key?(:order)
if column.show_blank_record?(associated)
show_blank_record = build_associated(column.association, parent_record)
end
Expand Down

0 comments on commit e9faeac

Please sign in to comment.