Class: ManifestationCustomPropertiesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ManifestationCustomPropertiesController
- Defined in:
- app/controllers/manifestation_custom_properties_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /manifestation_custom_properties.
-
#destroy ⇒ Object
DELETE /manifestation_custom_properties/1.
-
#edit ⇒ Object
GET /manifestation_custom_properties/1/edit.
-
#index ⇒ Object
GET /manifestation_custom_properties.
-
#new ⇒ Object
GET /manifestation_custom_properties/new.
-
#show ⇒ Object
GET /manifestation_custom_properties/1.
-
#update ⇒ Object
PATCH/PUT /manifestation_custom_properties/1.
Instance Method Details
#create ⇒ Object
POST /manifestation_custom_properties
24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/manifestation_custom_properties_controller.rb', line 24 def create @manifestation_custom_property = ManifestationCustomProperty.new(manifestation_custom_property_params) if @manifestation_custom_property.save redirect_to @manifestation_custom_property, notice: t('controller.successfully_created', model: t('activerecord.models.manifestation_custom_property')) else render :new end end |
#destroy ⇒ Object
DELETE /manifestation_custom_properties/1
49 50 51 52 |
# File 'app/controllers/manifestation_custom_properties_controller.rb', line 49 def destroy @manifestation_custom_property.destroy redirect_to manifestation_custom_properties_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.manifestation_custom_property')) end |
#edit ⇒ Object
GET /manifestation_custom_properties/1/edit
20 21 |
# File 'app/controllers/manifestation_custom_properties_controller.rb', line 20 def edit end |
#index ⇒ Object
GET /manifestation_custom_properties
6 7 8 |
# File 'app/controllers/manifestation_custom_properties_controller.rb', line 6 def index @manifestation_custom_properties = ManifestationCustomProperty.order(:position) end |
#new ⇒ Object
GET /manifestation_custom_properties/new
15 16 17 |
# File 'app/controllers/manifestation_custom_properties_controller.rb', line 15 def new @manifestation_custom_property = ManifestationCustomProperty.new end |
#show ⇒ Object
GET /manifestation_custom_properties/1
11 12 |
# File 'app/controllers/manifestation_custom_properties_controller.rb', line 11 def show end |
#update ⇒ Object
PATCH/PUT /manifestation_custom_properties/1
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'app/controllers/manifestation_custom_properties_controller.rb', line 35 def update if params[:move] move_position(@manifestation_custom_property, params[:move]) return end if @manifestation_custom_property.update(manifestation_custom_property_params) redirect_to @manifestation_custom_property, notice: t('controller.successfully_updated', model: t('activerecord.models.manifestation_custom_property')) else render :edit end end |