Class: Admin::OrganizationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/organizations_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject


8
9
10
11
12
# File 'app/controllers/admin/organizations_controller.rb', line 8

def index
  @organizations = Organization.where(:id => current_user.organization_id)
  
  respond_with(@organizations)
end

#updateObject


14
15
16
17
18
19
20
# File 'app/controllers/admin/organizations_controller.rb', line 14

def update
  @organization = Organization.where(:id => current_user.organization_id).first
  @organization.update_attributes(organization_params)
  
  flash[:success] = "Update successful"
  respond_with(@organization, :location => admin_organizations_path)
end