Class: RewardsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rewards_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#display_uservoice_sso, #render_facebook_like, #render_facebook_sdk, #render_twitter

Instance Method Details

#createObject



23
24
25
# File 'app/controllers/rewards_controller.rb', line 23

def create
  create! { project_by_slug_path(permalink: parent.permalink) }
end

#destroyObject



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

def destroy
  destroy! { project_by_slug_path(permalink: resource.project.permalink) }
end

#editObject



15
16
17
# File 'app/controllers/rewards_controller.rb', line 15

def edit
  render layout: false
end

#indexObject



7
8
9
# File 'app/controllers/rewards_controller.rb', line 7

def index
  render layout: false
end

#newObject



11
12
13
# File 'app/controllers/rewards_controller.rb', line 11

def new
  render layout: false
end

#sortObject



31
32
33
34
35
# File 'app/controllers/rewards_controller.rb', line 31

def sort
  resource.update_attribute :row_order_position, params[:reward][:row_order_position]

  render nothing: true
end

#updateObject



19
20
21
# File 'app/controllers/rewards_controller.rb', line 19

def update
  update! { project_by_slug_path(permalink: parent.permalink) }
end