Sha256: f17eb4c8ec1e56def7618bb656b8a459c5fd6a6d5fe7d2c623a91d4f5d809f8d

Contents?: true

Size: 492 Bytes

Versions: 90

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

module Rails
  # Add Navigation bar to Rails application
  class NavigationGenerator < Rails::Generators::NamedBase
    def add_link
      append_to_file 'app/views/shared/_navbar.html.erb',
                     after: '<!-- SZ Link Placeholder -->' do
        <<-HTML

        <%= link_to "#{plural_name.capitalize}", #{plural_name}_path, class: "block md:inline-block p-3 border-b-2 border-gray-100 md:border-none" %>
        HTML
      end
    end
  end
end

Version data entries

90 entries across 90 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.3.5 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.3.4 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.3.3 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.3.2 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.3.1 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.3.0 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.43 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.42 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.41 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.40 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.39 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.38 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.37 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.36 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.35 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.34 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.33 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.32 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.31 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb