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

Other Useful Business Software
Agentic AI SRE built for Engineering and DevOps teams. Icon
Agentic AI SRE built for Engineering and DevOps teams.

No More Time Lost to Troubleshooting

NeuBird AI's agentic AI SRE delivers autonomous incident resolution, helping team cut MTTR up to 90% and reclaim engineering hours lost to troubleshooting.
Learn More
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