Changeset 5029
- Timestamp:
- 09/05/06 23:07:25 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/simply_helpful/lib/simply_helpful/record_identifier.rb
r5026 r5029 18 18 end 19 19 20 def dom_id(record) 21 record.new_record? ? "new_#{singular_class_name(record)}" : "#{singular_class_name(record)}_#{record.id}" 20 def dom_id(record, prefix = nil) 21 prefix ||= 'new' unless record.id 22 [prefix, record.class.name.underscore, record.id].compact * '_' 22 23 end 23 24