lib/outpost/controller/actions.rb in outpost-cms-0.0.3 vs lib/outpost/controller/actions.rb in outpost-cms-0.0.4
- old
+ new
@@ -26,11 +26,11 @@
respond_with :outpost, @record
end
def create
@record = model.new(form_params)
-
+
if @record.save
notice "Saved #{@record.simple_title}"
respond_with :outpost, @record, location: requested_location
else
breadcrumb "New"
@@ -51,12 +51,12 @@
def destroy
@record.destroy
notice "Deleted #{@record.simple_title}"
respond_with :outpost, @record
end
-
+
private
-
+
def form_params
params[model.singular_route_key]
end
def requested_location