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

integer-inheritance

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

integer-inheritance

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source
  class Post < ActiveRecord::Base
    uses_integer_inheritance
  end

  class Article < Post
  end

  class Publication < Post
  end

  # Add to initializers or to some script that is not reloaded:
  # (this adds support for reloading in development mode. See ActionDispatch::Reloader)
  IntegerInheritance.describe do

    # Use full class name here (only strings!)
    with 'Post' do
      map 1, to: 'Post'
      map 2, to: 'Article'

      # You can specify more than one type
      map 3, 4, to: 'Publication'
    end
  end

Gemfile

gem 'integer-inheritance', '~> 1.0'

FAQs

Package last updated on 20 Oct 2016

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