- Apr 17, 2018
-
-
Filipa Lacerda authored
-
Filipa Lacerda authored
-
- Apr 16, 2018
-
-
Filipa Lacerda authored
-
Filipa Lacerda authored
-
Filipa Lacerda authored
-
- Apr 13, 2018
-
-
Filipa Lacerda authored
-
Filipa Lacerda authored
Move html to haml file instead of JS
-
- Apr 12, 2018
-
-
Filipa Lacerda authored
-
- Apr 11, 2018
-
-
Michael Kozono authored
-
Takuya Noguchi authored
-
George Tsiolis authored
-
George Tsiolis authored
-
Lin Jen-Shin authored
-
Filipa Lacerda authored
-
Yorick Peterse authored
This refactors the Markdown pipeline so it supports the rendering of multiple documents that may belong to different projects. An example of where this happens is when displaying the event feed of a group. In this case we retrieve events for all projects in the group. Previously we would group events per project and render these chunks separately, but this would result in many SQL queries being executed. By extending the Markdown pipeline to support this out of the box we can drastically reduce the number of SQL queries. To achieve this we introduce a new object to the pipeline: Banzai::RenderContext. This object simply wraps two other objects: an optional Project instance, and an optional User instance. On its own this wouldn't be very helpful, but a RenderContext can also be used to associate HTML documents with specific Project instances. This work is done in Banzai::ObjectRenderer and allows us to reuse as many queries (and results) as possible.
-
Simon Knox authored
-
blackst0ne authored
In Rails 5.0 the `ActiveRecord::Inheritance::subclass_from_attributes` method was updated. Now it calls the `find_sti_class` method [1] which is overriden in the `Event` model and returns needed class (`Event` vs `PushEvent`). [1]: https://github.com/rails/rails/blob/5-0-stable/activerecord/lib/active_record/inheritance.rb#L209 This commit fixes the errors like ``` 143) User#contributed_projects doesn't include IDs for unrelated projects Failure/Error: action = attrs.with_indifferent_access[inheritance_column].to_i NoMethodError: undefined method `with_indifferent_access' for nil:NilClass # ./app/models/event.rb:118:in `subclass_from_attributes' ``` which are raised on the `RAILS5=1 rspec ...` command.
-
Grzegorz Bizon authored
-
blackst0ne authored
The `RAILS5=1 rspec spec/controllers/admin/application_settings_controller_spec.rb` command throws the error: Failures: 1) Admin::ApplicationSettingsController PUT #update falls back to defaults when settings are omitted Failure/Error: import_sources = params[:application_setting][:import_sources] NoMethodError: undefined method `[]' for nil:NilClass # ./app/controllers/admin/application_settings_controller.rb:62:in `application_setting_params' This commit fixes it.
-
- Apr 10, 2018
-
-
Winnie Hellmann authored
-
Phil Hughes authored
-
Filipa Lacerda authored
-
Kamil Trzcińśki authored
This reverts merge request !17730
-
Mayra Cabrera authored
-
- Apr 09, 2018
-
-
Filipa Lacerda authored
-
Andreas Brandl authored
This removes the extra check for project-ids which is not needed at all. This does not necessarily reduce execution time of the query, but improves planning time by a few millseconds. Closes #37125.
-
Stan Hu authored
-
Sean McGivern authored
Goldiloader is great, but has several issues with has_many :through relations: * https://github.com/salsify/goldiloader/issues/12 * https://github.com/salsify/goldiloader/issues/14 * https://github.com/salsify/goldiloader/issues/18 Rather than try to figure out which applies in each case, we should just do the drudge work of manually disabling autoloading for all relations of this type. We can always use regular preloading for specific cases, but this way we avoid generating invalid queries through Goldiloader's magic.
-
Yorick Peterse authored
Goldiloader (https://github.com/salsify/goldiloader) can eager load associations automatically. This removes the need for adding "includes" calls in a variety of different places. This also comes with the added benefit of not having to eager load data if it's not used.
-
blackst0ne authored
-
Dylan Griffith authored
-
Dylan Griffith authored
Use project_authorizations instead of members to calculate manageable CI projects to speed up query (#41981)
-
Dylan Griffith authored
-
- Apr 08, 2018
-
-
Stan Hu authored
The legacy endpoint requires no reference and defaults to the root ref. Closes #45154
-
-
Fabian Schneider authored
-
Stan Hu authored
An untested code path was triggering an Exception because Fixnum doesn't have `one?` implemented in Rails, while arrays and collections do. Closes #45152
-
- Apr 07, 2018
-
-
blackst0ne authored
In Rails 5.0 the `ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES` constant has been removed [1] and the remaining `FALSE_VALUES` constant has been moved to `ActiveModel::Type::Boolean` [2] [1]: https://github.com/rails/rails/commit/a502703c3d2151d4d3b421b29fefdac5ad05df61 [2]: https://github.com/rails/rails/commit/9cc8c6f3730df3d94c81a55be9ee1b7b4ffd29f6
-
blackst0ne authored
-
Mayra Cabrera authored
The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC. A Forever lib class was included to handle future dates for PostgreSQL and MySQL, also changes were made to DeployToken to enforce Forever.date Also removes extra conditional from JwtController
-