Class: ContactsController

Inherits:
ApplicationController
  • Object
show all
Includes:
ControllerMixins::Contacts
Defined in:
app/controllers/contacts_controller.rb

Instance Method Summary collapse

Methods included from ControllerMixins::Contacts

#create!, #destroy!, #update!

Instance Method Details

#createObject



35
36
37
# File 'app/controllers/contacts_controller.rb', line 35

def create
  create!(:client_contact_path)
end

#destroyObject



46
47
48
# File 'app/controllers/contacts_controller.rb', line 46

def destroy
  destroy!(:client_contacts_path)
end

#editObject



43
44
# File 'app/controllers/contacts_controller.rb', line 43

def edit
end

#indexObject



24
25
26
# File 'app/controllers/contacts_controller.rb', line 24

def index
  @contacts = @client.contacts.all
end

#newObject



31
32
33
# File 'app/controllers/contacts_controller.rb', line 31

def new
  @contact = Contact.new(params[:contact])
end

#showObject



28
29
# File 'app/controllers/contacts_controller.rb', line 28

def show
end

#updateObject



39
40
41
# File 'app/controllers/contacts_controller.rb', line 39

def update
  update!(:client_contact_path)
end