Class: ActiveAdmin::Reloader::RailsLessThan31Reloader::FileUpdateChecker

Inherits:
ActiveSupport::FileUpdateChecker
  • Object
show all
Defined in:
lib/active_admin/reloader.rb

Instance Method Summary collapse

Instance Method Details

#execute_if_updatedObject



82
83
84
# File 'lib/active_admin/reloader.rb', line 82

def execute_if_updated
  super
end

#pathsObject



72
73
74
75
# File 'lib/active_admin/reloader.rb', line 72

def paths
  # hack to support both Rails 3.1 and 3.2
  @files || @paths
end

#updated_atObject

Over-ride the default #updated_at to support the deletion of files



78
79
80
# File 'lib/active_admin/reloader.rb', line 78

def updated_at
  paths.map { |path| File.mtime(path) rescue Time.now }.max
end