Module: ResponseForRc::Actions
Overview
actions using response_for
Instance Method Summary
collapse
clone, extended, remove_action_method
Instance Method Details
#create ⇒ Object
36
37
38
39
|
# File 'lib/response_for_rc/actions.rb', line 36
def create
self.resource = new_resource
@resource_saved = resource.save
end
|
#destroy ⇒ Object
78
79
80
81
|
# File 'lib/response_for_rc/actions.rb', line 78
def destroy
self.resource = find_resource
resource.destroy
end
|
#edit ⇒ Object
25
26
27
|
# File 'lib/response_for_rc/actions.rb', line 25
def edit
self.resource = find_resource
end
|
#index ⇒ Object
6
7
8
|
# File 'lib/response_for_rc/actions.rb', line 6
def index
self.resources = find_resources
end
|
#new ⇒ Object
21
22
23
|
# File 'lib/response_for_rc/actions.rb', line 21
def new
self.resource = new_resource
end
|
#show ⇒ Object
17
18
19
|
# File 'lib/response_for_rc/actions.rb', line 17
def show
self.resource = find_resource
end
|
#update ⇒ Object
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
|