Module: Programmable::ResourceController::CommonActions

Included in:
Actions, SingletonActions
Defined in:
lib/rc_actions/common_actions.rb

Instance Method Summary collapse

Instance Method Details

#create ⇒ Object



10
11
12
13
# File 'lib/rc_actions/common_actions.rb', line 10

def create
  @resource_saved = resource.save
  response_for_create
end

#destroy ⇒ Object



23
24
25
# File 'lib/rc_actions/common_actions.rb', line 23

def destroy
  response_for_destroy resource.destroy
end

#edit ⇒ Object



15
16
# File 'lib/rc_actions/common_actions.rb', line 15

def edit
end

#new ⇒ Object



7
8
# File 'lib/rc_actions/common_actions.rb', line 7

def new
end

#show ⇒ Object



4
5
# File 'lib/rc_actions/common_actions.rb', line 4

def show
end

#update ⇒ Object



18
19
20
21
# File 'lib/rc_actions/common_actions.rb', line 18

def update
  @resource_saved = resource.update_attributes params[resource_name]
  response_for_update
end