No Records

When building your index views, you always need to handle the case where there are no records to display.

The 'no records' component provides a clean and flexible element to display and style your "no records" message, along with a description and option to show a button to add the first record.

Installation

Copy
rails g instrumental:no_records

To insert a component into a view:

Copy
rails g instrumental:no_records:insert

Customization

Find all of your customization options (via local variables) in these files:

app/views/shared/components/_no_records.html.erb

Instrumental Components

I created Instrumental Components to make designing and building professional apps with Ruby on Rails easy, fast, and fun. I use it on all of my projects and I hope it helps you build something great.

Brian Casel
Brian Casel
Creator of Instrumental Components
Learn more Send me a question or request