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
RateStore.create_tables! |
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
# All index fields are required, | |
# the rest is the schemaless content | |
rate = Rate.put(hotel_id: 1, | |
room_type: '1 bed', | |
check_in_date: Date.today, | |
discount_type: 'geo', | |
net_price: 120.0) # potentially ~20 fields | |
rate[:hotel_id] # => 1 | |
rate[:net_price] # => 120.0 |
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
rates = Rate.where(hotel_id: 1, | |
room_type: '1 bed', | |
check_in_date: Date.today) |
OlderNewer