Sha256: 4724c27e406054e342a2b68955e462f664df32c3bf82e62b3c4a4cbcb336923d

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

# Subdirectory controller
# -----------------------

# Before

before 'index.html.haml' do
  @before_index_literal = :subdirectory
end

before /index\.html/ do
  @before_index_regexp = :subdirectory
end

before do
  @before_all = :subdirectory
end

before 'fail' do
  @fail = true
end

before /fail/ do
  @fail = true
end

before 'before_render_text.html.haml' do
  instead render(:text => 'subdirectory')
end

before 'before_render_partial.html.haml', 'before_non_existent.html' do
  instead render(:path => '_partial.html.haml')
end

before 'before_render_locals.html.haml' do
  instead render(:path => '_locals.html.haml', :locals => { :x => true })
end

# Helpers

helpers do
  def helper
    :subdirectory
  end
end

# Ignore

ignore 'ignore.html.haml'

# Layout

layout(
  'layout_controller.html.haml' => 'layout.html.haml',
  'layout_controller_from_root.html.haml' => '/layout.html.haml'
)

before 'layout_action.html.haml' do
  layout 'layout.html.haml'
end

before 'layout_action_from_root.html.haml' do
  layout '/layout.html.haml'
end

# Priority

priority(
  '/before_render_partial.html.haml' => 1,
  'index.html.haml' => -1
)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stasis-0.2.0 spec/fixtures/project/subdirectory/controller.rb
stasis-0.2.0.pre spec/fixtures/project/subdirectory/controller.rb