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

jqr-has_one_autocreate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jqr-has_one_autocreate

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Has One Autocreate

Automatic creation of a has_one associated object when it is first accessed.

== Examples

class User < ActiveRecord::Base has_one :profile, :autocreate => true end

class Profile < ActiveRecord::Base belongs_to :user end

make a single user

user = User.create(:name => 'Dr. User') => #<User id: 1, name: "Dr. User">

look for any profile objects

Profile.count => 0

access the user's profile object to see it automatically created

user.profile => #<Profile id: 1, title: nil, user_id: 1>

== Install

As a Rails plugin.

./script/plugin install git://github.com/jqr/has_one_autocreate.git

Prefer gems?

gem sources -a http://gems.github.com gem install jqr-has_one_autocreate

Homepage:: http://github.com/jqr/has_one_autocreate/tree/master
License:: Copyright (c) 2008 Elijah Miller mailto:elijah.miller@gmail.com, released under the MIT license.

FAQs

Package last updated on 11 Aug 2014

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