Module: Sinatra::Xeditable_Select

Defined in:
lib/sinatra/xeditable_select.rb

Overview

Provide Javascript and html for a X-Editable select box

Example

xselect=get_xeditable_select({a:'a',b:'b', c:'c', d:'d'}, "/path/to/action/", '.my_custom_selects')

On javascript section, you include

xselect.javascript

On html side, you include

xselect.html(resource_id, :a)

Defined Under Namespace

Modules: Helpers Classes: Select

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



85
86
87
# File 'lib/sinatra/xeditable_select.rb', line 85

def self.registered(app)
  app.helpers Xeditable_Select::Helpers
end