Amazon AWS SDK Manual do Utilizador Página 27

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 29
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 26
secret_access_key: REPLACE_WITH_SECRET_ACCESS_KEY
test:
<<: *development
production:
<<: *development
6. Create app/models/my_record.rb as follows:
class MyRecord < AWS::Record::Base
string_attr :name
end
7. Create the SimpleDB domain:
$ rails console
> MyRecord.create_domain
8. Now, you can play around with the model by creating some records and querying them:
> MyRecord.find(:all).to_a
=> []
> MyRecord.new(:name => "The first one").save
=> true
> MyRecord.new(:name => "The second one").save
=> true
> MyRecord.where('name like ?', "%first%").count
=> 1
Exit the rails console before continuing to the next step:
> exit
To generate a scaffold controller for your model
1. Type the following command:
$ rails generate scaffold_controller MyRecord name:string
rails server
2. Add a route to your scaffold controller in config/routes.rb:
Version v1.0.0
24
AWS SDK for Ruby Developer Guide
Run the Samples
Vista de página 26
1 2 ... 22 23 24 25 26 27 28 29

Comentários a estes Manuais

Sem comentários

Dell W3000 TV Handbücher

Bedienungsanleitungen und Benutzerhandbücher für Computerzubehör Dell W3000 TV.
Wir stellen 3 PDF-Handbücher Dell W3000 TV zum kostenlosen herunterladen nach Dokumenttypen zur Verfügung Bedienungsanleitung






Weitere Produkte und Handbücher für Computerzubehör Dell

Modelle Dokumententyp
Premium Lock Bedienungsanleitung   Инструкция по эксплуатации Dell Premium Lock, 1 Seiten
Combination Lock Bedienungsanleitung    Инструкция по эксплуатации Dell Combination Lock, 1 Seiten
Entry Lock Bedienungsanleitung    Инструкция по эксплуатации Dell Entry Lock, 1 Seiten
Portable Power Companion (12000mAh) PW7015M Bedienungsanleitung   Dell Portable Power Companion (12000mAh) PW7015M User Manual, 1 Seiten
Wireless Mouse WM324 Bedienungsanleitung    Dell Wireless Mouse WM324 Manuel d'utilisation, 2 Seiten