Sponsor dashboard added, with sponsor component for splash page
This commit is contained in:
parent
643b8b173a
commit
ea119a8158
36 changed files with 549 additions and 12 deletions
43
app/controllers/admin/organizations_controller.rb
Normal file
43
app/controllers/admin/organizations_controller.rb
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
class Admin::OrganizationsController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
respond_to :html
|
||||
|
||||
def index
|
||||
@organizations = Organization.all
|
||||
end
|
||||
|
||||
def new
|
||||
@organization = Organization.new
|
||||
end
|
||||
|
||||
def create
|
||||
@organization = Organization.new(params[:organization])
|
||||
flash[:notice] = 'Organization was successfully created.' if @organization.save
|
||||
respond_with @organization, :location => admin_organizations_path
|
||||
end
|
||||
|
||||
def show
|
||||
@organization = Organization.find(params[:id])
|
||||
end
|
||||
|
||||
def edit
|
||||
@organization = Organization.find(params[:id])
|
||||
end
|
||||
|
||||
def update
|
||||
@organization = Organization.find(params[:id])
|
||||
flash[:notice] = 'Organization was successfully updated' if @organization.update_attributes(params[:organization])
|
||||
respond_with @organization, :location => admin_organizations_path
|
||||
end
|
||||
|
||||
def delete
|
||||
@organization = Organization.find(params[:id])
|
||||
end
|
||||
|
||||
def destroy
|
||||
@organization = Organization.find(params[:id])
|
||||
@organization.destroy
|
||||
redirect_to admin_organizations_path, :notice => "Organization got deleted"
|
||||
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue