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