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
.ui-autocomplete { | |
position: absolute; | |
top: 100%; | |
left: 0; | |
z-index: 1000; | |
float: left; | |
display: none; | |
min-width: 160px; | |
_width: 160px; | |
padding: 4px 0; |
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
/* A handful of useful CSS snippets*/ |
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
// Useful Backbone Snippets |
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
1. gem ‘bootstrap-sass’ | |
2. mv assets/stylesheets/application.css assets/stylesheets/application.css.scss | |
3. in application.css.scss add @import “bootstrap”; | |
4. in application.js -> //= require bootstrap | |
5. in application.html.erb: | |
<%= stylesheet_link_tag 'application' %> | |
<%= javascript_include_tag 'application' %> | |
<%= csrf_meta_tags %> | |
6. Tweak variables in application.css.scss |
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
_.extend(Fighter, { | |
all: [], | |
events: {}, | |
on: function (eventTitle, callback) { | |
event[eventTitle] = this.events[eventTitle] || []; | |
this.events[eventTitle].push(callback); | |
}, | |
trigger: function (eventTitle){ | |
var callbacks = this.events[eventTitle]; | |
var arg = arguments[1]; |
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
# See https://help.github.com/articles/ignoring-files for more about ignoring files. | |
# | |
# If you find yourself ignoring temporary files generated by your text editor | |
# or operating system, you probably want to add a global ignore instead: | |
# git config --global core.excludesfile '~/.gitignore_global' | |
# Ignore bundler config. | |
/.bundle | |
# Ignore the default SQLite database. |
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 | |
attr_reader :password | |
before_validation :ensure_token | |
validates :username, uniqueness: true | |
validates :username, :session_token, presence: true | |
validates :password, presence: true, on: :create | |
validates :password_digest, presence: { message: "Password can't be blank"} | |
validates :password, length: { minimum: 6, allow_nil: true } | |
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
# template.rb | |
# Helpful links: | |
# Templates doc | |
# http://guides.rubyonrails.org/rails_application_templates.html | |
# Generator docs - in particular section 9 | |
# http://guides.rubyonrails.org/generators.html |