$ rails g model User
belongs_to
has_one
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
/*-- credits: http://jsfiddle.net/josedvq/38Tnx/ --*/ | |
.square-box{ | |
position: relative; | |
width: 50%; | |
overflow: hidden; | |
background: #4679BD; | |
} | |
.square-box:before{ | |
content: ""; |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
### | |
Disclaimer: | |
This gist is opinionated. It favors the usage of dashes over underscores. | |
http://stackoverflow.com/questions/7560813/why-are-dashes-preferred-for-css-selectors-html-attributes | |
License: | |
Free, Opensource, MIT | |
http://opensource.org/licenses/MIT | |
Usage: | |
Your HTML should be something like: | |