Sha256: 2fea48ad73bfdef1057f20ffd82028fb855abd6d4d845fbd141a70accc95c150

Contents?: true

Size: 523 Bytes

Versions: 3

Compression:

Stored size: 523 Bytes

Contents

# Add persistent attribute to the context class, allowing to disable 
# auto deactivation between HTTP requests
class Phenomenal::Context
  attr_accessor :persistent
  #DSL inside context definition
  def is_persistent
    @persistent  = true
    activate
    nil
  end
  
  def to_path
    if name
      name.to_s.underscore
    elsif self==manager.default_feature
      nil
    elsif manager.combined_contexts[self]
       manager.combined_contexts[self].flatten.join("/").underscore
    else
      nil
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phenomenal_rails-1.2.5 lib/phenomenal_rails/context.rb
phenomenal_rails-1.2.4 lib/phenomenal_rails/context.rb
phenomenal_rails-1.2.3 lib/phenomenal_rails/context.rb