Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prefab-rails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prefab-rails

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Prefab

A lightweight library for managing resources in your Rails application's controllers

Introduction

This gem provides a lightweight library that simplifies the controllers of your resources in a Rails application. It offers a set of intuitive and convenient methods for handling common CRUD operations, including creating, reading, updating, and deleting resources.

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add prefab

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install prefab

Usage

Include Prefab::Base in your top-level controller.

class ApplicationController < ActionController::Base
  include Prefab::Base
end

That will give your other controllers access to the prefab class method. Then you can prefab your specific resources:

class PostsController < ApplicationController
  prefab :posts
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bradly/prefab.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 25 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc