mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
This commit is contained in:
parent
f1369e4503
commit
1574485443
104 changed files with 204 additions and 213 deletions
|
@ -57,7 +57,7 @@ describe CategoriesController do
|
|||
}
|
||||
|
||||
response.status.should == 200
|
||||
category = Category.where(name: "hello").first
|
||||
category = Category.find_by(name: "hello")
|
||||
category.category_groups.map{|g| [g.group_id, g.permission_type]}.sort.should == [
|
||||
[Group[:everyone].id, readonly],[Group[:staff].id,create_post]
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue