{"repo":"rameerez/pricing_plans","free":true,"listed":false,"github":"https://github.com/rameerez/pricing_plans","clone":"git clone https://github.com/rameerez/pricing_plans.git","description":"💵 Define and enforce pricing plan limits in your Rails SaaS (entitlements, quotas, feature gating)","language":"Ruby","stars":61,"topics":["business","gem","gumroad","lemonsqueezy","limits","paddle","payments","pricing","pricing-table","quota"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"💵 pricing plans - Define and enforce pricing plan limits in your Rails app (SaaS entitlements) [!TIP] 🚀 Ship your next Rails app 10x faster! I've built RailsFast , a production-ready Rails boilerplate template that comes with everything you need to launch a software business in days, not weeks. Go check it out! pricing plans allows you to enforce pricing plan limits with one-liners that read like plain English. Avoid scattering and entangling pricing logic everywhere in your Rails SaaS. For example, this is how you define pricing plans and their entitlements: Plans are secure by default : features are disabled and limits are set to 0 unless explicitly configured. You can then gate features in your controllers: Do one-liner checks to hide / show conditional UI: Or check limits and feature access anywhere in your app: pricing plans is your single source of truth for pricing plans, so you can use it to build pricing pages and paywalls too. The gem works standalone, and it also plugs nicely into popular gems: it works seamlessly out of the box if you're already using pay or usage credits . More info here. Quickstart Add this to your Gemfile: Then install the gem: After that, generate and run the required migration: This will also create a config/initializers/pricing plans.rb file where you need to define your pricing plans. Then, just add the model mixin to the plan owner, that is: the actual model on which limits should be enforced ( User , Organization , etc.): This mixin wil","default_branch":null,"files":null,"tree":[],"storefront":"/r/rameerez","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rameerez/pricing_plans/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}