mirror of
https://github.com/ai/visibilityjs.git
synced 2026-01-14 07:47:57 -05:00
18 lines
441 B
Ruby
18 lines
441 B
Ruby
# Used only for Ruby on Rails gem to tell, that gem contain `lib/assets` with
|
|
# visibility.js file.
|
|
module VisibilityJs
|
|
|
|
# Add assets paths to standalone Sprockets environment.
|
|
def self.install(sprockets)
|
|
sprockets.append_path(Pathname(__FILE__).dirname)
|
|
end
|
|
|
|
module Rails
|
|
class Engine < ::Rails::Engine
|
|
initializer 'visibilityjs' do
|
|
VisibilityJs.install(::Rails.application.assets)
|
|
end
|
|
end
|
|
end
|
|
end
|