Skip to content

Instantly share code, notes, and snippets.

class NavTabs extends React.Component {
render() {
return (
<RoutedTabs selectors={[
{tab: 0, path: '/one/:id', exact: true}, // Matches /one/123 exactly
{tab: 1, path: '/one/:id/child', exact: true}, // Matches /one/123/child exactly
{tab: 2, path: '/two'}, // Matches /two/...
]}>
<Tab label="One" comonent={Link} to="/one/123"/>
<Tab label="One Child" comonent={Link} to="/one/123/child"/>
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
source 'https://rubygems.org'
gem 'rails', '~> 4.0.0'
gem 'pg'
gem 'spree', github: 'spree/spree', branch: '2-2-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable'
gem 'spree_static_content', github: 'spree/spree_static_content', branch: '2-2-stable'
gem 'spree_address_book', github: 'romul/spree_address_book', branch: '2-1-stable'
/*
* Copyright (C) 2010 The Android Open Source Project
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@jschwertfeger
jschwertfeger / autocomplete_association.js
Created October 5, 2012 20:49
A jQuery autocomplete widget for forms where the underlying model references another model via ID
/*
* Unobtrusive autocomplete for model associations.
*
* For instance, assume you have a model `Task' and a model `User'. The task has
* an attribute user_id which associates the user who is assigned to the task.
* This widget allows you to build a form for tasks where the association is
* represented by a hidden user_id field that gets populated through an
* autocomplete text field.
*
* To use it you just have to include the tag attributes for the autocomplete