Sha256: cc35ca428bef2f026d8b1e39cbdeef698933cc315d3759334f1e9faf8dc77027

Contents?: true

Size: 846 Bytes

Versions: 8

Compression:

Stored size: 846 Bytes

Contents

class ProtectedController < ApplicationController
  param_protected :a
  
  def an_action; end
  
  param_protected :b, :only => :only_one_action
  def only_one_action; end
  
  param_protected :c, :except => :except_one_action
  def except_one_action; end
  
  param_protected [:d, :e], :only => :params_as_array
  def params_as_array;end
  
  param_protected :f, :only => [:only_multiple_actions1, :only_multiple_actions2]
  def only_multiple_actions1; end
  def only_multiple_actions2; end
  
  param_protected :g, :except => [:except_multiple_actions1, :except_multiple_actions2]
  def except_multiple_actions1; end
  def except_multiple_actions2; end
  
  param_protected( { :h => :a }, :only => :nested_single )
  def nested_single; end
  
  param_protected( { :h => [:a, :b] }, :only => :nested_multiple )
  def nested_multiple; end
  
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
cjbottaro-param_protected-1.1.0 test/app_root/app/controllers/protected_controller.rb
param_protected-4.0.0 test/app_root/app/controllers/protected_controller.rb
param_protected-3.0.0 test/app_root/app/controllers/protected_controller.rb
param_protected-2.0.0 test/app_root/app/controllers/protected_controller.rb
param_protected-1.3.1 test/app_root/app/controllers/protected_controller.rb
param_protected-1.3.0 test/app_root/app/controllers/protected_controller.rb
param_protected-1.2.0 test/app_root/app/controllers/protected_controller.rb
param_protected-1.1.0 test/app_root/app/controllers/protected_controller.rb