Created
March 14, 2016 00:03
-
-
Save backus/644bbfe9c411e227b63a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class SomeModel < ActiveRecord::Base | |
scope :my_scope, lambda do |param| | |
where(blah: param) | |
end | |
end |
This file contains hidden or 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
#!/bin/sh | |
bundle exec ruby -v | |
bundle list | |
bundle exec rubocop --rails --only Rails/ScopeArgs app/models/example.rb |
This file contains hidden or 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
source 'https://rubygems.org' | |
ruby '2.3.0' | |
gem 'rubocop', '0.38.0' |
This file contains hidden or 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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
ast (2.2.0) | |
parser (2.3.0.6) | |
ast (~> 2.2) | |
powerpack (0.1.1) | |
rainbow (2.1.0) | |
rubocop (0.38.0) | |
parser (>= 2.3.0.6, < 3.0) | |
powerpack (~> 0.1) | |
rainbow (>= 1.99.1, < 3.0) | |
ruby-progressbar (~> 1.7) | |
unicode-display_width (~> 1.0, >= 1.0.1) | |
ruby-progressbar (1.7.5) | |
unicode-display_width (1.0.2) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
rubocop (= 0.38.0) | |
BUNDLED WITH | |
1.11.2 |
This file contains hidden or 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
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] | |
Gems included by the bundle: | |
* ast (2.2.0) | |
* bundler (1.11.2) | |
* parser (2.3.0.6) | |
* powerpack (0.1.1) | |
* rainbow (2.1.0) | |
* rubocop (0.38.0) | |
* ruby-progressbar (1.7.5) | |
* unicode-display_width (1.0.2) | |
Inspecting 1 file | |
C | |
Offenses: | |
app/models/example.rb:2:20: C: Use lambda/proc instead of a plain method call. | |
scope :my_scope, lambda do |param| | |
^^^^^^ | |
1 file inspected, 1 offense detected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment