This file contains 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
# lib/liquid_i18n_rails.rb | |
module LiquidI18nRails | |
def t(string) | |
I18n.t(string.to_sym) | |
end | |
end | |
# config/initializers/liquid.rb | |
require 'liquid_i18n_rails' | |
Liquid::Template.register_filter LiquidI18nRails |
This file contains 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
{ | |
"links": { | |
"posts.author": { | |
"href": "http://example.com/people/{posts.author}", | |
"type": "people" | |
}, | |
"posts.comments": { | |
"href": "http://example.com/comments/{posts.comments}", | |
"type": "comments" | |
} |
This file contains 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
en: | |
locale_names: | |
af: "Afrikaans" | |
sq: "Albanian" | |
ar: "Arabic" | |
hy: "Armenian" | |
az: "Azerbaijani" | |
eu: "Basque" | |
be: "Belarusian" | |
bn: "Bengali" |
This file contains 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
<form accept-charset="UTF-8" action="https://www.bookingsync.com/en/mybookings/1/inquire" method="post"> | |
<div style="display:none"><input name="utf8" type="hidden" value="✓"></div> | |
<label for="inquiry_rental_id">Rental</label> | |
<select id="inquiry_rental_id" name="inquiry[rental_id]"> | |
<option selected="selected" value="1234">Villa Boubouki</option> | |
<option value="1235">Villa Anatoli</option> | |
<option value="1236">Villa Amoudia</option> | |
<option value="1237">Villa Sivota</option> | |
</select> |
This file contains 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
{ | |
"links": { | |
"rentals.account": "https://www.bookingsync.com/api/v3/accounts/{rentals.account}", | |
"rentals.availability": "https://www.bookingsync.com/api/v3/availabilities/{rentals.availability}", | |
"rentals.destination": "https://www.bookingsync.com/api/v3/destinations/{rentals.destination}", | |
"rentals.rates_table": "https://www.bookingsync.com/api/v3/rates_tables/{rentals.rates_table}", | |
"rentals.rental_agreement": "https://www.bookingsync.com/api/v3/rental_agreements/{rentals.rental_agreement}", | |
"rentals.photos": "https://www.bookingsync.com/api/v3/photos/{rentals.photos}", | |
"rentals.reviews": "https://www.bookingsync.com/api/v3/reviews/{rentals.reviews}", | |
"rentals.special_offers": "https://www.bookingsync.com/api/v3/special_offers/{rentals.special_offers}", |
This file contains 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
<form id="bs_booknow_form" action="{{ rental.booknow_url }}" method="get"> | |
<input type="hidden" id="bs_booknow_rental_id" name="rental_id" value="{{ rental.bookingsync_id }}" /> | |
<input type="hidden" id="bs_booknow_source" name="source" value="{{ site.domain }}" /> | |
<input type="hidden" id="bs_booknow_include_tentative" name="include_tentative" value="{{ site.tentatives_as_available }}"> | |
<div class="row"> | |
<div class="col-xs-6 col-sm-12 col-md-6"> | |
<div class="form-group date"> | |
<label class="date control-label" for="bs_booknow_start_at"> | |
{% t 'search.form.checkin' %}</label> | |
<input autocomplete="off" class="date form-control" data-datepicker="" |
This file contains 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
/* =========================================================== | |
* bootstrap-datepicker.js v1.3.0 | |
* http://twitter.github.com/bootstrap/javascript.html#datepicker | |
* =========================================================== | |
* Copyright 2011 Twitter, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
This file contains 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
/** | |
* Inspired from Mootools 1.2 Element.Storage (http://blog.mootools.net/2008/1/22/Element_Storage) | |
* | |
* License: | |
* MIT-style license. | |
* | |
* Author: | |
* Sebastien Grosjean (http://zencocoon.com) | |
* | |
* Tested under FF 2, FF3, Safari 3, Opera 9.25, IE6, IE7, Camino 1.6 |
This file contains 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
# In Ruby | |
# How to deeply fetch an Hash | |
# Having : | |
hash = {"parent" => {"child" => "value"}} | |
# How to get value from "parent.child" ? | |
# Ideal solution | |
hash.deep_fetch(["parent", "child"]) |
This file contains 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>untitled</title> | |
</head> | |
<body> | |
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"></script> | |
<script type="text/javascript"> |
OlderNewer