Changeset 1307
- Timestamp:
- 06/09/08 20:55:59 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
acts_as_reportable/lib/ruport/acts_as_reportable.rb
r1233 r1307 370 370 # 371 371 def get_attributes_with_options(options = {}) 372 only_or_except = 373 if options[:only] or options[:except] 374 { :only => options[:only], :except => options[:except] } 375 end 376 attrs = attributes(only_or_except) 372 attrs = attributes 373 attrs.slice!(*options[:only].map(&:to_s)) if options[:only] 374 attrs.except!(*options[:except].map(&:to_s)) if options[:except] 377 375 attrs = attrs.inject({}) {|h,(k,v)| 378 376 h["#{options[:qualify_attribute_names]}.#{k}"] = v; h
