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
import Route from './route'; | |
export function defineRoutes(i18n) { | |
let routes = [ | |
{ | |
name: 'Home', | |
path: new RegExp('^\/?((\\w{2})\/?)?$'), | |
parameters: {2: 'locale'} | |
}, { | |
name: 'Dashboard', | |
path: new RegExp(`^\/?((\\w{2})\/?)?${i18n.t('dashboard')}$`), |
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
[ensureProducts]: (products_data, token)=>{ | |
if (products_data === null){ | |
return loop( | |
products_data, | |
Effects.promise(()=>{ | |
let api = new ProductsApi(token); | |
return api.index() | |
.then(productsRetrieved) | |
}) | |
) |
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
// databasable.js | |
import Loki from 'lokijs/src/lokijs'; | |
import LokiIndexedAdapter from 'lokijs/src/loki-indexed-adapter'; | |
const DEFAULTS = { | |
autosave: false | |
}; | |
var databasable = { |
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
class User < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, | |
:recoverable, :rememberable, :trackable, :validatable, | |
:authentication_keys => [:login] | |
attr_accessor :login | |
# ... |
NewerOlder