How it tend to work :
user provide's a hash like this to view (in any way they want to and acceptable by marionette):
bindAttributes: {
name: [{
to: 'html',
el: '.change'
}],
How it tend to work :
user provide's a hash like this to view (in any way they want to and acceptable by marionette):
bindAttributes: {
name: [{
to: 'html',
el: '.change'
}],
#! /usr/bin/env ruby | |
Js = 'public/static/js/_tpl.js' | |
Rb = 'config/initializers/templates.rb' | |
files = Dir.glob('templates/**/*.html') | |
templates = {} | |
total_size = 0 | |
count = 0 |
For persian_date
add jalalidate
to your gemfiles, then add this to ApplicationHelper
as helper (or any other place you want to use).
Default date format here is like (یکشنبه ۲۹ دی ۱۳۹۲ - ۰۳:۱۰
) for more format options see.
unpack
Snippet from a question in stackoverflow
module ApplicationHelper
def persian_numbers(str)
str ? str.unpack('U*').map{ |e| (0..9).to_a.include?(e-48) ? e + 1728 : e }.pack('U*') : ''
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
fa: | |
devise: | |
confirmations: | |
confirmed: "حساب کاربری شما با موفقیت تایید شد. شما اکنون وارد شدید." | |
send_instructions: "ایمیلی حاوی اطالاعات و روند تاییدسازی حساب کاربری برای شما ارسال شد." | |
send_paranoid_instructions: "در صورتی که ایمیلی با محتوای وارد شده در دادههای ما وجود داشته باشد، ایمیلی حاوی فرآید فعالسازی حساب کاربری برای شما ارسال خواهد شد." | |
failure: | |
already_authenticated: "شما قبال وارد سایت شدهای." |
// ==UserScript== | |
// @name TweetDeck RTL checker | |
// @namespace http://twitter.com/keykakito | |
// @description TweetDeck RTL checker | |
// @include https://tweetdeck.twitter.com/ | |
// @version 0.2 | |
// @grant none | |
// ==/UserScript== | |
(function() { |
// ==UserScript== | |
// @name Replace digikala mobile links | |
// @namespace KiTO | |
// @description Replace digikala mobile links | |
// @author KiTO | |
// @version 0.0.1 | |
// @grant none | |
// @run-at document-end | |
// @match https://www.digikala.com/* | |
// @match http://www.digikala.com/* |