文件名称:param_protected:从Rails应用程序中的controllersaction中过滤掉不需要的参数。 提供类似于ActiveRecord的attr_protected和attr_accessible的param_protected和param_accessible
文件大小:22KB
文件格式:ZIP
更新时间:2024-03-21 13:38:35
Ruby
摘要 该插件在ActiveController::Base上提供了两个类方法,用于过滤该控制器操作的params哈希值。 您可以将它们视为attr_protected和attr_accessible的控制器类似物。 安装 Rails的2.3.x版本 gem install param_protected -v "~> 1.0.0" Rails的3.0.x中 gem "param_protected" , "~> 2.0.0" 感谢提供了Rails 3端口。 Rails的3.1.X gem "param_protected" , "~> 3.0.0" 感谢提供的Rails 3.1端口。 Rails的3.2.x中 gem "param_protected" , "~> 4.0.0" 用法 class YourController < ActiveController::Ba
【文件预览】:
param_protected-master
----param_protected.gemspec(3KB)
----VERSION(6B)
----lib()
--------param_protected()
--------param_protected.rb(204B)
----Gemfile(137B)
----README.rdoc(3KB)
----Rakefile(1KB)
----init.rb(50B)
----LICENSE(1KB)
----test()
--------conditions_controller_test.rb(209B)
--------users_controller_test.rb(889B)
--------test_helper.rb(814B)
--------protector_test.rb(8KB)
--------protected_controller_test.rb(960B)
--------app_root()
--------merge_controller_test.rb(306B)
--------accessible_only_test.rb(222B)
--------accessible_except_test.rb(224B)
--------inherited_users_controller_test.rb(704B)
----Gemfile.lock(2KB)
----.gitignore(35B)
----CHANGELOG(1KB)