Skip to content

Instantly share code, notes, and snippets.

// GET /room_rates/[:hotel_id]?from_date=[:datetime]&to_date=[:datetime]&last_updated_at=[:datetime]
// Response:
{
...hotel metadata
rooms: [
{
...room metadata
policies: [
...policy metadata (cancellation/breakfast etc)
class CommentsController < ApplicationController
def users_comments
posts = Post.all
comments = posts.map(&:comments).flatten
@user_comments = comments.select do |comment|
comment.author.username == params[:username]
end
end
end
.range-slider-container {
position:relative;
width:100%;
height:100px;
}
.range-slider-left {
position:absolute;
top:0;
width:100%;