Class: Admin::PropertiesController
Constant Summary
collapse
- INSTANCES =
{
label: Property::Label,
image: Property::Image
}.with_indifferent_access
Instance Method Summary
collapse
#current_user, #posts, #signed_in?
Instance Method Details
#create ⇒ Object
10
11
12
13
14
|
# File 'lib/ecrire/app/controllers/admin/properties_controller.rb', line 10
def create
instance = instance_for_property(params[:property])
@property = instance.create(params)
render "admin/properties/#{instance.name}/create"
end
|
#destroy ⇒ Object
16
17
18
19
20
|
# File 'lib/ecrire/app/controllers/admin/properties_controller.rb', line 16
def destroy
instance = instance_for_property(params[:property])
@property = instance.destroy(params)
render "admin/properties/#{instance.name}/destroy"
end
|