adding files not commited from previous commit
This commit is contained in:
1 parent
f387139ae1
commit
f73f09ffcf
726 files changed
+129696
No files matched your search
@@ -0,0 +1,45 @@
|
||||
class Admin::DesignsController < ApplicationController
|
||||
layout "admin"
|
||||
|
||||
def index
|
||||
@designs = Design.all.entries
|
||||
end
|
||||
|
||||
def new
|
||||
@designs = Design.new
|
||||
@designs.stylesheets.build
|
||||
@designs.javascripts.build
|
||||
@designs.images.build
|
||||
|
||||
end
|
||||
|
||||
def update
|
||||
params[:design][:existing_task_attributes] ||= {}
|
||||
@design = Design.find(params[:id])
|
||||
if @design.update_attributes(params[:design])
|
||||
flash[:notice] = "Successfully updated design and tasks."
|
||||
redirect_to admin_designs_path(@design)
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@design = Design.find(params[:id])
|
||||
end
|
||||
|
||||
def destroy
|
||||
end
|
||||
|
||||
def create
|
||||
debugger
|
||||
@design = Design.new(params[:design])
|
||||
if @design.save
|
||||
flash[:notice] = "Successfully created design and tasks."
|
||||
redirect_to admin_designs_path
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user