Apidock_header
  • Welcome
  • Register
  • Projects
  • Help
  • About
  • Blog
Use OpenID
  • Rspec_icon_16RSpec
  • Rails_icon_16Ruby on Rails
  • Ruby_icon_16Ruby
method

primary_key=

Importance_1
v3.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods
  • 1.0.0
  • 1.1.6
  • 1.2.6
  • 2.0.3
  • 2.1.0
  • 2.2.1
  • 2.3.8
  • 3.0.0 (0)
  • 3.0.9 (8)
  • 3.1.0 (-6)
  • 3.2.1 (38)
  • 3.2.8 (0)
  • 3.2.13 (0)
  • 4.0.2 (0)
  • 4.1.8 (0)
  • 4.2.1 (0)
  • 4.2.7 (0)
  • 4.2.9 (0)
  • 5.0.0.1 (0)
  • 5.1.7 (0)
  • 5.2.3 (0)
  • 6.0.0 (0)
  • 6.1.3.1 (0)
  • 6.1.7.7 (0)
  • 7.0.0 (0)
  • 7.1.3.2 (0)
  • 7.1.3.4 (0)
  • What's this?

Related methods

  • Instance methods (14)
  • Importance_0_sm composite_primary_key? (>= v7.1.3.2)
  • Importance_0_sm dangerous_attribute_method? (>= v3.2.1)
  • Importance_0_sm define_method_attribute (>= v3.2.1)
  • Importance_0_sm derive_primary_key Icon_private_sm (>= v7.1.3.2)
  • Importance_0_sm get_primary_key
  • Importance_0_sm inherited Icon_private_sm (>= v7.1.3.2)
  • Importance_0_sm instance_method_already_imp... (>= v5.1.7)
  • Importance_0_sm original_primary_key (>= v3.2.1)
  • Importance_1_sm primary_key
  • Importance_1_sm primary_key=
  • Importance_1_sm quoted_primary_key (>= v3.0.9)
  • Importance_0_sm reset_primary_key
  • Importance_1_sm set_primary_key
  • Importance_0_sm suppress_composite_primary_key Icon_private_sm (>= v5.1.7)

Icon_private_sm = private
Icon_protected_sm = protected

primary_key=(value = nil, &block) public

Alias for #set_primary_key

Register or log in to add new notes.
  • Welcome
  • Register
  • Projects
  • Help
  • About
  • Blog


APIdock release: IRON STEVE (1.4)
If you have any comments, ideas or feedback, feel free to contact us at

Go to Nodeta blog APIdock copyright Nodeta Oy 2008-2025