Class: Admin::VolunteerContactsController

Inherits:
CrudController
  • Object
show all
Includes:
PublicActivity::StoreController
Defined in:
app/controllers/admin/volunteer_contacts_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /volunteer_contacts GET /volunteer_contacts.xml


14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/admin/volunteer_contacts_controller.rb', line 14

def index
  @search = VolunteerContact.organization(current_user).search(params[:q])
  @volunteer_contacts = @search.result.paginate(:page => params[:page], :per_page => 10).order("updated_at DESC")

  respond_with(@volunteer_contacts) do |format|
    format.html # index.html.erb
    format.csv { render :csv => VolunteerContact.organization(current_user),
                        :filename => 'volunteer_contacts' }
  end
end