Sha256: b9f1481c201161dd5dc38ea2c200c4f59f72d60e43c575cb2a99a17084507676

Contents?: true

Size: 1.55 KB

Versions: 6

Compression:

Stored size: 1.55 KB

Contents

require File.expand_path('../../application_template_helper', __FILE__)

generate_test_application do

  #*****************************************************************************
  #  MODELS AND SCAFFOLDING

  generate(:scaffold, 'galaxies/elliptical_galaxy name:string --old-style-hash')
  generate(:scaffold, 'galaxies/lenticular_galaxy name:string --old-style-hash')
  generate(:scaffold, 'galaxies/spiral_galaxy name:string --old-style-hash')
  generate(:scaffold, 'planets/exoplanet name:string --old-style-hash')
  generate(:scaffold, 'planets/rogue_planet name:string --old-style-hash')

  #*****************************************************************************
  #  MORE CONTROLLERS AND VIEWS

  generate(:controller, 'home index --old-style-hash')
  replace_view 'home', 'index', <<-CODE.strip_heredoc
    <h1>Explanation</h1>
    This application is useful for testing multiple tab sets.
    <ul>
      <li><a href="/galaxies/elliptical_galaxies">tab set one</a></li>
      <li><a href="/planets/exoplanets">tab set two</a></li>
    </ul>
  CODE

  #*****************************************************************************
  #  MORE ROUTES

  route "root :to => 'home#index'"

  #*****************************************************************************
  #  LAYOUT

  replace_application_layout <<-CODE.strip_heredoc
    <!DOCTYPE html>
    <html>
    <head>
      <title>Multiple Tabsets</title>
      <%= csrf_meta_tag %>
    </head>
    <body>
      <%= tabs(:galaxies) %>
      <%= tabs(:planets) %>
      <%= yield %>
    </body>
    </html>
  CODE

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tabulous-2.1.4 spec/applications/multiple_tabsets/application_template.rb
tabulous-2.1.3 spec/applications/multiple_tabsets/application_template.rb
tabulous-2.1.2 spec/applications/multiple_tabsets/application_template.rb
tabulous-2.1.1 spec/applications/multiple_tabsets/application_template.rb
tabulous-2.1.0 spec/applications/multiple_tabsets/application_template.rb
tabulous-2.0.0 spec/applications/multiple_tabsets/application_template.rb