Class: ActiveScaffold::Bridges::Chosen

Inherits:
DataStructures::Bridge show all
Defined in:
lib/active_scaffold/bridges/chosen.rb,
lib/active_scaffold/bridges/chosen/helpers.rb

Defined Under Namespace

Modules: Helpers

Class Method Summary collapse

Methods inherited from DataStructures::Bridge

prepare, run

Class Method Details

.installObject


2
3
4
# File 'lib/active_scaffold/bridges/chosen.rb', line 2

def self.install
  require File.join(File.dirname(__FILE__), 'chosen/helpers.rb')
end

.install?Boolean

Returns:

  • (Boolean)

6
7
8
# File 'lib/active_scaffold/bridges/chosen.rb', line 6

def self.install?
  super && %i[jquery prototype].include?(ActiveScaffold.js_framework)
end

.javascriptsObject


14
15
16
# File 'lib/active_scaffold/bridges/chosen.rb', line 14

def self.javascripts
  ["chosen-#{ActiveScaffold.js_framework}", "#{ActiveScaffold.js_framework}/active_scaffold_chosen"]
end

.stylesheetsObject


10
11
12
# File 'lib/active_scaffold/bridges/chosen.rb', line 10

def self.stylesheets
  'chosen'
end