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

active_table

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

active_table

  • 0.1.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

ActiveTable

ActiveTable is a thin layer on top of ActiveRecord that uses temporary tables to meet all of your static data needs.

Installation

gem install active_table

Usage

Everything you need to set up ActiveTable lives within your model. It should be placed above any other code so that it can initialize the table and tell ActiveRecord to reload the attributes from the table. A sample model is as follows:

class Color < ActiveTable::Base
  active_table do
    create_table :colors do |t|
      t.string :name
    end

    insert :id => 1, :name => "Chartreuse"
    insert :id => 2, :name => "Cerulean"
    insert :id => 3, :name => "Taupe"
  end
end

ActiveTable will handle all of the CREATE/INSERT operations for every database connections that is opened. You get to use your new model just like an ActiveRecord model and stop worrying about everything else.

FAQs

Package last updated on 15 Sep 2011

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