Sha256: 84f65e90f2e21c0fe81d029632ad6268c3fbeedee0dd3a11fcd34a9230c96787

Contents?: true

Size: 870 Bytes

Versions: 16

Compression:

Stored size: 870 Bytes

Contents

# By default Volt generates this controller for your Main component
module Main
  class MainController < Volt::ModelController
    def index
      # Add code for when the index view is loaded
    end

    def about
      # Add code for when the about view is loaded
    end

    private

    # The main template contains a #template binding that shows another
    # template.  This is the path to that template.  It may change based
    # on the params._component, params._controller, and params._action values.
    def main_path
      "#{params._component || 'main'}/#{params._controller || 'main'}/#{params._action || 'index'}"
    end

    # Determine if the current nav component is the active one by looking
    # at the first part of the url against the href attribute.
    def active_tab?
      url.path.split('/')[1] == attrs.href.split('/')[1]
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
volt-0.9.1 templates/project/app/main/controllers/main_controller.rb
volt-0.9.1.pre5 templates/project/app/main/controllers/main_controller.rb
volt-0.9.1.pre4 templates/project/app/main/controllers/main_controller.rb
volt-0.9.1.pre3 templates/project/app/main/controllers/main_controller.rb
volt-0.9.1.pre2 templates/project/app/main/controllers/main_controller.rb
volt-0.9.1.pre1 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0.pre7 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0.pre6 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0.pre5 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0.pre4 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0.pre3 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0.pre2 templates/project/app/main/controllers/main_controller.rb
volt-0.9.0.pre1 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta9 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta8 templates/project/app/main/controllers/main_controller.rb