Skip to content

Instantly share code, notes, and snippets.

@lusis
Created June 20, 2010 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lusis/445499 to your computer and use it in GitHub Desktop.
Save lusis/445499 to your computer and use it in GitHub Desktop.
jvincent@jvx64:~/Dropbox/test/padtest$ padrino-gen model Client name:string phone:string email:string
=> Located unlocked Gemfile for development
apply orms/ripple
create app/models/client.rb
jvincent@jvx64:~/Dropbox/test/padtest$ padrino console
=> Loading development console (Padrino v.0.9.13)
=> Located unlocked Gemfile for development
=> Loading Application Padtest
Couldn't load Wirble: no such file to load -- interactive_editor
ree-1.8.7-2010.02 > myclient = Client.new
=> #<Client:0x37e5d80 @attributes={"created_at"=>Sun Jun 20 02:29:15 UTC 2010}, @changed_attributes={}, @new=true>
ree-1.8.7-2010.02 > myclient.name = 'NASA'
=> "NASA"
ree-1.8.7-2010.02 > myclient.phone = '777-777-7777'
=> "777-777-7777"
ree-1.8.7-2010.02 > myclient.email = 'god@nasa.gov'
=> "god@nasa.gov"
ree-1.8.7-2010.02 > myclient.save
=> true
ree-1.8.7-2010.02 > myclient
=> #<Client:0x37e5d80 @_on_validate=:create, @_initialized_create_callbacks=true, @_initialized_save_callbacks=true, @attributes={"name"=>"NASA", "created_at"=>Sun Jun 20 02:29:15 UTC 2010, "updated_at"=>Sun Jun 20 02:29:47 UTC 2010, "phone"=>"777-777-7777", "email"=>"god@nasa.gov"}, @key="ltw7wSIJx7NI4NrARoqefwWRgf", @_initialized_validation_callbacks=true, @validation_context=nil, @changed_attributes={}, @robject=#<Riak::RObject http://127.0.0.1:8098/riak/clients/ltw7wSIJx7NI4NrARoqefwWRgf [application/json]:{"name"=>"NASA", "created_at"=>"Sun, 20 Jun 2010 02:29:15 -0000", "updated_at"=>"Sun, 20 Jun 2010 02:29:47 -0000", "_type"=>"Client", "phone"=>"777-777-7777", "email"=>"god@nasa.gov"}>, @errors=#<OrderedHash {}>, @_initialized_validate_callbacks=true, @new=false>
ree-1.8.7-2010.02 > Client.first
=> #<Client:0x374f240 @attributes={"name"=>"NASA", "created_at"=>Sun Jun 20 02:29:15 UTC 2010, "updated_at"=>Sun Jun 20 02:29:47 UTC 2010, "_type"=>"Client", "phone"=>"777-777-7777", "email"=>"god@nasa.gov"}, @key="ltw7wSIJx7NI4NrARoqefwWRgf", @changed_attributes={}, @robject=#<Riak::RObject http://127.0.0.1:8098/riak/clients/ltw7wSIJx7NI4NrARoqefwWRgf [application/json]:{"name"=>"NASA", "created_at"=>"Sun, 20 Jun 2010 02:29:15 -0000", "updated_at"=>"Sun, 20 Jun 2010 02:29:47 -0000", "_type"=>"Client", "phone"=>"777-777-7777", "email"=>"god@nasa.gov"}>, @new=false>
ree-1.8.7-2010.02 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment