Sha256: b02f9f45a099b3746c0cf769e660475ba37886ff29e75e21a0af6a68c97e9853

Contents?: true

Size: 425 Bytes

Versions: 5

Compression:

Stored size: 425 Bytes

Contents

class ConditionsController < ApplicationController
  param_accessible :a, :if => :something?
  param_accessible :b, :unless => false
  param_protected  :b, :if => :first_action?
  param_accessible :c, :if => lambda { |controller| controller.instance_eval { first_action? } }
  
  def first; end
  
  def second; end

  protected
  
  def something?
    true
  end

  def first_action?
    action_name == 'first'
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
param_protected-4.0.0 test/app_root/app/controllers/conditions_controller.rb
param_protected-3.0.0 test/app_root/app/controllers/conditions_controller.rb
param_protected-2.0.0 test/app_root/app/controllers/conditions_controller.rb
param_protected-1.3.1 test/app_root/app/controllers/conditions_controller.rb
param_protected-1.3.0 test/app_root/app/controllers/conditions_controller.rb