[obs-commits] [openSUSE/open-build-service] e58c4b: [api][webui] Move History.find_by_element into ass...
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: e58c4bf87a45407c55898de34e74221741a30f8a https://github.com/openSUSE/open-build-service/commit/e58c4bf87a45407c55898d... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2016-12-30 (Fri, 30 Dec 2016) Changed paths: M src/api/app/models/history.rb M src/api/app/models/review.rb Log Message: ----------- [api][webui] Move History.find_by_element into association Because it is an association between HistoryElement and Review. No need to ask History and handing the review object over. Commit: 4641333c200a109d9a766871d85d2372300f8eaf https://github.com/openSUSE/open-build-service/commit/4641333c200a109d9a7668... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2016-12-30 (Fri, 30 Dec 2016) Changed paths: M src/api/app/controllers/webui/request_controller.rb M src/api/app/models/bs_request.rb R src/api/app/models/history.rb M src/api/test/functional/request_controller_test.rb M src/api/test/unit/history_test.rb Log Message: ----------- [api][webui] Remove History.find_by_request query function The History class was just a helper class to query history elements of Request and Review objects. This is now handled via Rails associations in the Request and Review models. - Added Request#request_history_elements association to query HistoryElements of this Request - Added Request#history_elements function to query HistoryElements of this Request and associated Reviews (was withreviews option) - Added helper association Request#review_history_elements - Removed History class as it is not necessary anymore This was a refactoring to use rails build in functionality and remove unnecessary code. Functionality stayed the same. Commit: 252b98e8e944f43e435518684b9534cd9df2d61b https://github.com/openSUSE/open-build-service/commit/252b98e8e944f43e435518... Author: Ana María Martínez Gómez <ammartinez@suse.de> Date: 2016-12-30 (Fri, 30 Dec 2016) Changed paths: M src/api/app/controllers/webui/request_controller.rb M src/api/app/models/bs_request.rb R src/api/app/models/history.rb M src/api/app/models/review.rb M src/api/test/functional/request_controller_test.rb M src/api/test/unit/history_test.rb Log Message: ----------- Merge pull request #2504 from ChrisBr/remove_history_class Remove History class and introduces associations Compare: https://github.com/openSUSE/open-build-service/compare/4b36772b2a82...252b98...
participants (1)
-
Ana María Martínez Gómez