lib/zertico/permitted_params.rb in zertico-2.0.0.alpha.3 vs lib/zertico/permitted_params.rb in zertico-2.0.0.beta.1
- old
+ new
@@ -9,9 +9,17 @@
end
module Zertico
class PermittedParams < Delegator
alias_method :params, :interface
+
+ def create
+ params[self.class.interface_class.name.underscore.to_sym]
+ end
+
+ def update
+ params[self.class.interface_class.name.underscore.to_sym]
+ end
def self.interface_class
name.chomp('PermittedParams').singularize.constantize
rescue NameError
name.chomp('PermittedParams').split('::').last.singularize.constantize
\ No newline at end of file