Salve communitas Lutetianae Rubiniensis.
Cassandrae sumus loqui.
Prima aprilis est ergo Latine loqui vobis volui neque ex sermone Gallico vetero sed aeger sum non bene valeo et munus est difficile.
Ce seroit a ma grant honte que reste du conte en françois se feroit.
Voilà c'est dit (et c'est le denier mot en latin pour aujourd'hui)
Notez quand même BigQuery & Redshift mais on n'aime pas le cloud nous si?
apt-get install dsc20
apt-get install opscenter
apt-get install datastax-agent
Il y a des outils en ligne de commande il y a des outils fenêtrés
rails new paris-rb-cassandra
cd paris-rb-cassandra
$EDITOR Gemfile
gem 'cequel'
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'quiet_assets'
gem 'rails_layout'
gem 'byebug'
end
bundle
rails g cequel:configuration
rails g cequel person name:text
rails g scaffold person name:text
rails g cequel heart_beat heart_beat:timestamp intensity:int
rails g scaffold heart_beat heart_beat:timestamp intensity:int
$EDITOR app/models/heart_beat.rb
belongs_to :person
$EDITOR app/models/person.rb
has_many :heart_beats
rake cequel:init
$EDITOR app/controllers/heart_beats_controller.rb
SO.... we had a problem with the datetime_select helper .. and no time to investigate. Hackety hack... you will see some more changes in the git ...
def new
raise "How can we have a hear beat withtout a person ?" if Person.count == 0
@heart_beat = HeartBeat.new
@heart_beat.person = Person.first
end
$EDITOR app/concerns/cequel_concern.rb
module CequelConcern
extend ActiveSupport::Concern
def read_attribute_for_serialization(n)
n == "id" ? attributes[n].to_s : attributes[n]
end
def to_param
self.id.to_s
end
end
$EDITOR app/models/heart_beat.rb
include CequelConcern
$EDITOR app/models/person.rb
include CequelConcern
rails g layout:install
rails s