Skip to content

Commit da7fb0e

Browse files
committed
Coding style
1 parent 55ce81d commit da7fb0e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ Metrics/LineLength:
3232
Metrics/BlockLength:
3333
Max: 30
3434

35+
Metrics/MethodLength:
36+
Max: 15
37+
3538
Metrics/ClassLength:
3639
Max: 130
3740

lib/ajax-datatables-rails/datatable/column.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ class Column
1818

1919
include Search
2020
include Order
21+
prepend DateFilter unless AjaxDatatablesRails.old_rails?
2122

22-
unless AjaxDatatablesRails.old_rails?
23-
prepend DateFilter
24-
end
2523

2624
def initialize(datatable, index, options)
2725
@datatable = datatable

lib/generators/rails/datatable_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Rails
66
module Generators
77
class DatatableGenerator < ::Rails::Generators::Base
88
desc 'Creates a *_datatable model in the app/datatables directory.'
9-
source_root File.expand_path('../templates', __FILE__)
9+
source_root File.expand_path('templates', __dir__)
1010
argument :name, type: :string
1111

1212
def generate_datatable

0 commit comments

Comments
 (0)