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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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