Sha256: ef7d001649d09000f1df43bed8c4b4329621829d6518c09b28a7c6d4488b55ee

Contents?: true

Size: 766 Bytes

Versions: 10

Compression:

Stored size: 766 Bytes

Contents

# By default Volt generates this controller for your Main component
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._controller and params._action values.
  def main_path
    params._controller.or('main') + '/' + params._action.or('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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
volt-0.8.27.beta7 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta6 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta5 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta4 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta3 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta2 templates/project/app/main/controllers/main_controller.rb
volt-0.8.27.beta1 templates/project/app/main/controllers/main_controller.rb
volt-0.8.26.beta1 templates/project/app/main/controllers/main_controller.rb
volt-0.8.26 templates/project/app/main/controllers/main_controller.rb
volt-0.8.24 templates/project/app/main/controllers/main_controller.rb