http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
// -------------------------------------------------------- | |
// arrows | |
// -------------------------------------------------------- | |
// $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right | |
// $color: hex, rgb or rbga | |
// $size: px or em | |
// @example | |
// .element{ | |
// @include arrow(top, #000, 50px); | |
// } |
$(function() { | |
/* Convenience for forms or links that return HTML from a remote ajax call. | |
The returned markup will be inserted into the element id specified. | |
*/ | |
$('form[data-update-target]').live('ajax:success', function(evt, data) { | |
var target = $(this).data('update-target'); | |
$('#' + target).html(data); | |
}); | |
}); |
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" |
/** | |
* Masking with equilateral triangles in CSS | |
*/ | |
body{ | |
background: #fff; | |
min-height: 100%; | |
} | |
/* |
http://guides.rubyonrails.org/migrations.html
<% pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) } %> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<% pages.each do |p| %> | |
<url> | |
<loc>http://youdomain.com/<%=p.destination_path.gsub('/index.html','')%></loc> | |
<priority>0.7</priority> | |
</url> | |
<% end %> | |
</urlset> |
# encoding: utf-8 | |
xml.instruct! | |
# Drop this file in your source directory | |
# | |
# Uses the builder gem. | |
# Add | |
# gem 'builder', '~> 2.0' | |
# to the Gemfile, and run builder install | |
# |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.