Created
December 8, 2011 16:50
-
-
Save coderforhire/1447567 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appliance = Appliance.new(:venue => "m1234", :ip_address => "123.123.123.123", :last_login => "123545") | |
=> #<Appliance id: nil, venue: nil, ip_address: nil, last_login: nil, created_at: nil, updated_at: nil> | |
class Appliance < ActiveRecord::Base | |
attr_accessible :venue, :ip_address, :last_login | |
end | |
~ | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
uby-1.9.2-p290 :024 > Appliance.create(:venue => "m1234", :ip_address => "123.123.123.123", :last_login => "123545")
(0.3ms) BEGIN
SQL (0.4ms) INSERT INTO "appliances" ("created_at", "ip_address", "last_login", "updated_at", "venue") VALUES ($1, $2, $3, $4, $5) RETURNING "id" ["created_at", Thu, 08 Dec 2011 16:52:49 UTC +00:00], ["ip_address", nil], ["last_login", nil], ["updated_at", Thu, 08 Dec 2011 16:52:49 UTC +00:00], ["venue", nil] COMMIT
=> #<Appliance id: 6, venue: nil, ip_address: nil, last_login: nil, created_at: "2011-12-08 16:52:49", updated_at: "2011-12-08 16:52:49">