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
This subtab is always enabled. The neighboring subtab, called "always disabled", should never be clickable.
CODE replace_view 'misc', 'always_visible', <<-CODE.strip_heredocThis 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