Skip to content

Commit

Permalink
Use shortened syntax and strip whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeredpath committed May 16, 2016
1 parent 8e945d6 commit 4551dc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/generators/administrate/routes/routes_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def valid_dashboard_models
end

def database_models
ActiveRecord::Base.descendants.reject { |klass| klass.abstract_class? }
ActiveRecord::Base.descendants.reject(&:abstract_class?)
end

def invalid_database_models
Expand Down
6 changes: 3 additions & 3 deletions spec/generators/routes_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def self.table_name
routes = file("config/routes.rb")
expect(routes).to have_correct_syntax
end
it 'skips abstract models without a warning' do

it "skips abstract models without a warning" do
stub_generator_dependencies
routes = file("config/routes.rb")

begin
class AbstractModel < ActiveRecord::Base
self.abstract_class = true
Expand Down

0 comments on commit 4551dc6

Please sign in to comment.