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.2.10 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.9 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.8 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.7 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.6 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.5 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.4 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.3 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.2 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.1 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.2.0 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.28 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.27 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.26 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.25 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.24 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.23 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.22 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.21 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb
rails_app_generator-0.1.20 templates/addons/generators/lib/generators/rails/navigation/navigation_generator.rb