module Redcrumbs::Options::ClassMethods

Public Instance Methods

prepare_redcrumbed_options(options) click to toggle source

prepare_redcrumbed_options prepares class level options that customise the behaviour of redcrumbed. See documentation for a full explanation of redcrumbed options.

# File lib/redcrumbs/options.rb, line 8
def prepare_redcrumbed_options(options)
  options.symbolize_keys!

  defaults = {
    :only => [],
    :store => {}
  }
  
  options.reverse_merge!(defaults)
  
  options[:only] = Array(options[:only])
  
  class_attribute :redcrumbs_options
  
  self.redcrumbs_options = options.dup

  options
end
redcrumbs_callback_options() click to toggle source
# File lib/redcrumbs/options.rb, line 27
def redcrumbs_callback_options
  redcrumbs_options.slice(:if, :unless)
end