Class: LesliSupport::CatalogPrioritiesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/lesli_support/catalog_priorities_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /catalog_priorities



24
25
26
27
28
29
30
31
32
# File 'app/controllers/lesli_support/catalog_priorities_controller.rb', line 24

def create
  @catalog_priority = CatalogPriority.new(catalog_priority_params)

  if @catalog_priority.save
    redirect_to @catalog_priority, notice: "Catalog priority was successfully created."
  else
    render :new, status: :unprocessable_entity
  end
end

#destroyObject

DELETE /catalog_priorities/1



44
45
46
47
# File 'app/controllers/lesli_support/catalog_priorities_controller.rb', line 44

def destroy
  @catalog_priority.destroy
  redirect_to catalog_priorities_url, notice: "Catalog priority was successfully destroyed.", status: :see_other
end

#editObject

GET /catalog_priorities/1/edit



20
21
# File 'app/controllers/lesli_support/catalog_priorities_controller.rb', line 20

def edit
end

#indexObject

GET /catalog_priorities



6
7
8
# File 'app/controllers/lesli_support/catalog_priorities_controller.rb', line 6

def index
  @catalog_priorities = CatalogPriority.all
end

#newObject

GET /catalog_priorities/new



15
16
17
# File 'app/controllers/lesli_support/catalog_priorities_controller.rb', line 15

def new
  @catalog_priority = CatalogPriority.new
end

#showObject

GET /catalog_priorities/1



11
12
# File 'app/controllers/lesli_support/catalog_priorities_controller.rb', line 11

def show
end

#updateObject

PATCH/PUT /catalog_priorities/1



35
36
37
38
39
40
41
# File 'app/controllers/lesli_support/catalog_priorities_controller.rb', line 35

def update
  if @catalog_priority.update(catalog_priority_params)
    redirect_to @catalog_priority, notice: "Catalog priority was successfully updated.", status: :see_other
  else
    render :edit, status: :unprocessable_entity
  end
end