lib/generators/templates/app/controllers/base.rb in beautiful_scaffold-0.1.4 vs lib/generators/templates/app/controllers/base.rb in beautiful_scaffold-0.1.5
- old
+ new
@@ -178,9 +178,20 @@
}
end
redirect_to :back
end
+
+ def treeview
+
+ end
+
+ def treeview_update
+ modelclass = <%= model_camelize %>
+ foreignkey = :<%= model %>_id
+
+ render :nothing => true, :status => (update_treeview(modelclass, foreignkey) ? 200 : 500)
+ end
private
def load_<%= model %>
@<%= model %> = <%= model_camelize %>.find(params[:id])