Class: HelpTipsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/help_tips_controller.rb

Instance Method Summary collapse

Instance Method Details

#hideObject



2
3
4
5
6
7
8
9
# File 'app/controllers/help_tips_controller.rb', line 2

def hide
  TipHide.create!(:user => current_user, :identifier => params[:tip_identifier])
  
  respond_to do |format|
    format.html {redirect_to :back}
    format.js {render :nothing => true}
  end
end

#resetObject



11
12
13
14
15
16
17
18
# File 'app/controllers/help_tips_controller.rb', line 11

def reset
  TipHide.where(:user_id => current_user.id).delete_all
  
  respond_to do |format|
    format.html {redirect_to :back, :notice => 'Help tips have been reset'}
    format.js {render :nothing => true}
  end
end