Draper adds an object-oriented layer of presentation logic to your Rails application. Without Draper, this functionality might have been tangled up in procedural helpers or adding bulk to your models. With Draper decorators, you can wrap your models with presentation-related logic to organize and test this layer of your app much more effectively. Imagine your application has an Article model. With Draper, you'd create a corresponding ArticleDecorator. The decorator wraps the model, and deals only with presentational concerns. In the controller, you decorate the article before handing it off to the view. In the view, you can use the decorator in exactly the same way as you would have used the model. But whenever you start needing logic in the view or start thinking about a helper method, you can implement a method on the decorator instead.

Features

  • Write decorators
  • Decorate objects
  • Decorate Query methods
  • Draper works out the box
  • Configure its default functionality
  • Draper supports RSpec, MiniTest::Rails, and Test::Unit

Project Samples

Project Activity

See All Activity >

Categories

Design, 3D Modeling

License

MIT License

Follow Draper

Draper Web Site

You Might Also Like
Top-Rated Free CRM Software Icon
Top-Rated Free CRM Software

216,000+ customers in over 135 countries grow their businesses with HubSpot

HubSpot is an AI-powered customer platform with all the software, integrations, and resources you need to connect your marketing, sales, and customer service. HubSpot's connected platform enables you to grow your business faster by focusing on what matters most: your customers.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Draper!

Additional Project Details

Programming Language

Ruby

Related Categories

Ruby Design Software, Ruby 3D Modeling Software

Registered

2021-10-29