Skip to content

Instantly share code, notes, and snippets.

@exviva
Created January 25, 2017 02:10
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 exviva/4a23c5035279ea9625ac1e4afec427ed to your computer and use it in GitHub Desktop.
Save exviva/4a23c5035279ea9625ac1e4afec427ed to your computer and use it in GitHub Desktop.
Shameless model
# app/models/rate.rb
class Rate
RateStore.attach(self)
index do
integer :hotel_id
string :room_type
string :check_in_date
shard_on :hotel_id # required, values need to be numeric
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment