Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* AO3-5022 Bump Rails to 4.1.16 * AO3-5022 Remove with_scope on Work model * AO3-5022 Bump Authlogic version * AO3-5022 Bump to Authlogic 3.4.6 * AO3-5022 Resolve old association syntax for archive_faq * Fixes triggering of CSRF protection in bookmarks controller spec `get :action, format: :js` triggers CSRF protection in Rails 4.1 Replace with `xhr :get, :action, format: :js` * Re-adds support for Minitest assertions in Cucumber steps * Fixes Authlogic::Session::Activateion::NotActivated error in logout user step * Fixes login step authlogic bugs * Removes 'group_by' virtual attribute if @fandoms is empty in users controller * Updates syntax for getting all Language ordered by short * Fixes admin invitations feature specs The old syntax `find(:all)` or `find(:first)` is incorrect - find now only accepts one argument, which it expects to be the id of the object it's looking for. This should fix the remaining spec failures in admin_invitations.feature * Fixes syntax for scope on user * Adds link_to_function helper This is in place of rewriting the html/javascript everywhere to be unobtrusive: http://guides.rubyonrails.org/working_with_javascript_in_rails.html#unobtrusive_javascript Which is the recommended approach. * Fixes query syntax in scope in Question model * Fixes MySql2 syntax error by calling 'size' instead of 'count' The bug this is addressing is described here: rails/rails#15138 I chose to use `size` in these cases because the collections are already loading. This by-steps the bug and isn't making another call to the database. * Fixes problem with AR query in SeriesController * Fix AR queries in Pseud model * Fixes the calling of a virtual attribute on an empty array of Fandom objects in the pseuds controller * Fixes AR query syntax errors found in comments_and_kudos/kudos.feature * Refactors helper method to eliminate bug Can't call `size` on a collection that hasn't been loaded, and `count` needs to go because of the known 4.1 but with select and count. * Fixes AR query syntax in pseud model scope * Fixes MySql count with select bug in challenge assignments partial Removes whitespace * Fixes bug where `size` was being called on `nil` * Fixes bug with order of operations one = 'one' && true will make one == true and return true (one = 'one') && true will make one == 'one' and return true * Adds rails_select_on_includes gem This fixes a problem raised in the UsersController (and potentially elsewhere) where Mysql was blowing up because a virtual attribute defined in a select statement wasn't a database column. See the issue this is discussed in: rails/rails#15185 And the Gem: https://github.com/alekseyl/rails_select_on_includes * Commits Gemfile.lock * Fixes `Mysql2::Error: Unknown column 'users.login'` in pseud model Eager loading the user in two queries in the pseud model (the `by_byline` scope and the `parse_byline` method) was causing Mysql to throw an Unknown column error. Using a join instead fixes the problem. * Fixes problem with includes statement The includes statements in question referenced a has_many association that used conditions (approved_conditions) that applied to an association of the association. (`Work.includes(:approved_collections)` where `approved_collections` are conditions that have collections that meet a certain criteria). By moving the scopes that determine whether a collection is approved/rejected/approved by user into the collectible model, the Work model doesn't have to guess what is meant by the reference to the columns `collection_items.attributes`. * Removes rails_select_on_includes It caused all other previously passing tests to start failing and didn't end up actually solving the problem it was supposed to. * Calls load on @fandoms in UsersController to make sure it's loaded before the view calls `.empty?` on it * Fixes `find :all` reference * Fixes outdated `find :all` reference * Fixes 'count' bug * Fixes typo in pseud model scope * Fixes outdated `find :all` syntax in media and tags controllers * Calls `load` on @fandoms variable in pseuds controller to prevent `empty?` from erroring out when it's called on @fandoms in the view * Fixes outed `find(:first...) syntax in app/helpers/tag_helpers * Adds Authlogic fix to tag steps that need it * Fixes variable reference * Fixes Authlogic problem with deleting account step * Fixes feature failures in users caused by outdated `find :all` syntax * Fixes works feature failures by updated outdated `find :all` syntax * Fixes challenge_signups_controller_spec failure * Fixes get requests with js format returning cross origin not allowed error in comments controller spec * Checks that expected params exist before passing them to update_attributes * Fixes get ... format: :js line to not raise cross origin error * Fixes outdated `find(:all)` syntax in tags controller * Try * Assign varible * Try this * And the second case * Corgis are still lovely * Fixes mysql syntax problem with `count` in SpamReport method * Shortens syntax in external authors controller conditional * Adds TODO/note about link_to_function definition * Fixes typo in work model * Removes duplicate line in user step definition * Removes comment for useless gem * Makes stylistic change - `size == 0` is better as `size.zero?`
- Loading branch information
Showing
36 changed files
with
249 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.