Class: LesliSupport::OptionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/lesli_support/options_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /options



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/lesli_support/options_controller.rb', line 6

def index
    respond_to do |format|
        format.html { }
        format.json do

            options = {
                types: CatalogType.select(:id, :name),
                categories: CatalogCategory.select(:id, :name),
                priorities: CatalogPriority.select(:id, :name).order(:weight),
                workspaces: CatalogWorkspace.select(:id, :name)
            }

            respond_with_successful(options)
        end
    end
end