Changeset 31
- Timestamp:
- 06/03/2007 07:57:38 PM (2 years ago)
- Files:
-
- trunk/auto-admin/init.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/auto-admin/init.rb
r23 r31 32 32 end 33 33 end 34 35 # We want AssociationProxy to forward #to_label on to its target, but 36 # because we're adding the above to Object after AssociationProxy 37 # flushes its instance methods, we have to do it manually. 38 ActiveRecord::Associations::AssociationProxy.send :undef_method, :to_label 39 40 class ::Array; def to_label; map {|m| m.to_label }.join(', '); end; end 34 41 class ::TrueClass; def to_label; 'Yes'; end; end 35 42 class ::FalseClass; def to_label; 'No'; end; end
