Menu

Commit [r2777]  Maximize  Restore  History

Changed Enumerations to use a Single Table Inheritance

* Added migrations to change Enumerations to an STI relationship
* Added TimeEntryActivity model (STI)
* Added DocumentCategory model (STI)
* Added IssuePriority model (STI)
* Added Enumeration#get_subclasses to get a list of the subclasses of Enumeration
* Changed Enumeration to use the STI type field instead of the opt field
* Changed Enumeration#opt to return the old opt values but with a deprecation warning.
* Removed Enumeration::OPTIONS
* Removed the dynamic named_scopes in favor of specific named_scopes. Kept for
compatibility reasons.
* Added Enumeration#default so each subclass can easily find it's default record.
* Fixed Enumeration#default to use the STI scoping with a fake default scope for finding Enumeration's default.
* Added a 'all' named scope for getting all records in order by position.
* Added Deprecation warnings to the old named_scopes in Enumerations.
* Moved various methods off of Enumeration and onto the concrete classes
* Changed the EnumerationsController to use types
* Updated the Enumeration list template
* Added has_many relationships to the Enumeration STI classes.
* Fixes for tests.

#3007

edavis10 2009-05-30

1 2 > >> (Page 1 of 2)
changed /trunk/app/controllers/documents_controller.rb
changed /trunk/app/controllers/enumerations_controller.rb
changed /trunk/app/controllers/issues_controller.rb
changed /trunk/app/controllers/reports_controller.rb
changed /trunk/app/controllers/timelog_controller.rb
changed /trunk/app/helpers/issues_helper.rb
changed /trunk/app/helpers/timelog_helper.rb
changed /trunk/app/models/document.rb
added /trunk/app/models/document_category.rb
changed /trunk/app/models/enumeration.rb
changed /trunk/app/models/issue.rb
added /trunk/app/models/issue_priority.rb
changed /trunk/app/models/mail_handler.rb
changed /trunk/app/models/query.rb
changed /trunk/app/models/time_entry.rb
added /trunk/app/models/time_entry_activity.rb
changed /trunk/app/views/documents/_form.rhtml
changed /trunk/app/views/enumerations/_form.rhtml
changed /trunk/app/views/enumerations/list.rhtml
changed /trunk/app/views/issues/bulk_edit.rhtml
changed /trunk/app/views/my/blocks/_issuesassignedtome.rhtml
added /trunk/db/migrate/20090323224724_add_type_to_enumerations.rb
added /trunk/db/migrate/20090401221305_update_enumerations_to_sti.rb
changed /trunk/test/fixtures/enumerations.yml
changed /trunk/test/fixtures/issues.yml
/trunk/app/controllers/documents_controller.rb Diff Switch to side-by-side view
Loading...
/trunk/app/controllers/enumerations_controller.rb Diff Switch to side-by-side view
Loading...
/trunk/app/controllers/issues_controller.rb Diff Switch to side-by-side view
Loading...
/trunk/app/controllers/reports_controller.rb Diff Switch to side-by-side view
Loading...
/trunk/app/controllers/timelog_controller.rb Diff Switch to side-by-side view
Loading...
/trunk/app/helpers/issues_helper.rb Diff Switch to side-by-side view
Loading...
/trunk/app/helpers/timelog_helper.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/document.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/document_category.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/enumeration.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/issue.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/issue_priority.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/mail_handler.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/query.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/time_entry.rb Diff Switch to side-by-side view
Loading...
/trunk/app/models/time_entry_activity.rb Diff Switch to side-by-side view
Loading...
/trunk/app/views/documents/_form.rhtml Diff Switch to side-by-side view
Loading...
/trunk/app/views/enumerations/_form.rhtml Diff Switch to side-by-side view
Loading...
/trunk/app/views/enumerations/list.rhtml Diff Switch to side-by-side view
Loading...
/trunk/app/views/issues/bulk_edit.rhtml Diff Switch to side-by-side view
Loading...
/trunk/app/views/my/blocks/_issuesassignedtome.rhtml Diff Switch to side-by-side view
Loading...
/trunk/db/migrate/20090323224724_add_type_to_enumerations.rb Diff Switch to side-by-side view
Loading...
/trunk/db/migrate/20090401221305_update_enumerations_to_sti.rb Diff Switch to side-by-side view
Loading...
/trunk/test/fixtures/enumerations.yml Diff Switch to side-by-side view
Loading...
/trunk/test/fixtures/issues.yml Diff Switch to side-by-side view
Loading...
1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.