Module: ResponseForRc::Actions

Extended by:
ResponsesModule
Included in:
SingletonActions
Defined in:
lib/response_for_rc/actions.rb

Overview

actions using response_for

Instance Method Summary collapse

Methods included from ResponsesModule

clone, extended, remove_action_method

Instance Method Details

#createObject



36
37
38
39
# File 'lib/response_for_rc/actions.rb', line 36

def create
  self.resource = new_resource
  @resource_saved = resource.save
end

#destroyObject



78
79
80
81
# File 'lib/response_for_rc/actions.rb', line 78

def destroy
  self.resource = find_resource
  resource.destroy
end

#editObject



25
26
27
# File 'lib/response_for_rc/actions.rb', line 25

def edit
  self.resource = find_resource
end

#indexObject



6
7
8
# File 'lib/response_for_rc/actions.rb', line 6

def index
  self.resources = find_resources
end

#newObject



21
22
23
# File 'lib/response_for_rc/actions.rb', line 21

def new
  self.resource = new_resource
end

#showObject



17
18
19
# File 'lib/response_for_rc/actions.rb', line 17

def show
  self.resource = find_resource
end

#updateObject



57
58
59
60
# File 'lib/response_for_rc/actions.rb', line 57

def update
  self.resource = find_resource
  @resource_saved = resource.update_attributes(params[resource_name])
end