module ActioncableAutoParam::ClassMethods

Public Instance Methods

auto_param(*method_names) click to toggle source
# File lib/actioncable_auto_param.rb, line 6
def auto_param(*method_names)
  method_names.each do |method_name|
    if method_name == :all
      self.auto_param_all_methods = true
    end

    self.auto_param_methods ||= []
    self.auto_param_methods.push(method_name)
  end
end
auto_param?(method_name) click to toggle source
# File lib/actioncable_auto_param.rb, line 17
def auto_param?(method_name)
  auto_param_all_methods || (auto_param_methods || []).include?(method_name)
end