require File.expand_path('../../application_template_helper', __FILE__) generate_test_application do #***************************************************************************** # MODELS AND SCAFFOLDING generate(:model, 'galaxy name:string --old-style-hash') 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(:model, 'planet name:string --old-style-hash') generate(:scaffold, 'exoplanet name:string --old-style-hash') generate(:scaffold, 'rogue_planet name:string --old-style-hash') generate(:scaffold, 'star name:string --old-style-hash') #***************************************************************************** # MORE CONTROLLERS AND VIEWS generate(:controller, 'home index --old-style-hash') replace_view 'home', 'index', <<-CODE.strip_heredoc

Explanation

This application is useful for testing that: CODE generate(:controller, 'misc always_hidden always_visible always_enabled always_disabled --old-style-hash') replace_view 'misc', 'always_enabled', <<-CODE.strip_heredoc

This subtab is always enabled. The neighboring subtab, called "always disabled", should never be clickable.

CODE replace_view 'misc', 'always_visible', <<-CODE.strip_heredoc

This subtab is always visible. The neighboring subtab, called "always hidden", should never be shown.

CODE #***************************************************************************** # MORE ROUTES route "root :to => 'home#index'" route "get 'hidden/always_visible' => 'misc#always_visible'" route "get 'hidden/always_hidden' => 'misc#always_hidden'" route "get 'disabled/always_enabled' => 'misc#always_enabled'" route "get 'disabled/always_disabled' => 'misc#always_disabled'" #***************************************************************************** # LAYOUT replace_application_layout <<-CODE.strip_heredoc Subtabs <%= stylesheet_link_tag 'reset' %> <%= stylesheet_link_tag 'application' %> <%= csrf_meta_tag %>

Subtabs

Test Application for Tabulous

<%= tabs %> <%= subtabs %>
<%= yield %>
CODE end