In Rails 2, you could use link_to_remote...

...:update => 'id' to automatically replace the content of $('#id').

Note that this card is very old. You might want to use ActiveType for your auto-coerced virtual attributes instead...

We usually generate our commit messages from Pivotal Tracker IDs and titles, like [#15775609] Index view for conflicts

When you generate a URL in a mailer view, ActionMailer will raise an error unless you previously configured it which...

Here are some popular mistakes when using nested forms: You are using fields_for instead of form.fields_for.

When you render a nested form for a Movie which has_many :actors, you want to render the right number...

If you want to use a helper_method my_helper_method inside a model, you can write ApplicationController.helpers.my_helper...

When rendering a number, you want to pretty up the string coming from #to_s: Render 0.0 as 0

This snippet makes links that refer to an anchor (like "...

...") scroll softly to it.\ In this example we only do...

schema.org

If you would like to enrich your website with semantic markup like contact data, places or events you should have...

devblog.imedo.de

XPath matchers can be combined with CSS-selector matchers. This is really useful if not, for example, the content of...

Update: Staticmatic will not be further developed. They suggest to switch to middleman. If you need to make a static...

makandra dev

This card shows you how to center a float horizontally in CSS. Also: find out what techniques are available for...

Internet Explorer 5+ is aware of conditional comments that let you target HTML for selected versions of IE. For example...

makandra dev

If you want to play music or sounds from a browser, your choice is to use either Flash or the...

nex-3.com

Sass now comes with user-defined functions, keyword arguments, list manipulation. Haml and Sass are now two separate gems.

You most likely have a form element inside another form element. Don't do that. Ever. Firefox and Chrome will...

Partials always define a local variable with the same name as themselves. E.g. when you are in _recent_users.html.erb, a local...

makandra dev

If you want to convert a README.rdoc file to HTML, say this from a shell: rdoc README.rdoc

ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...

blog.plataformatec.com.br

It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...

I prefer using Opera's "User mode" to toggle an outlining of HTML elements quickly. This helps greatly when you...

makandra dev

Within an event handler, there are multiple methods to cancel event propagation, each with different semantics. event.preventDefault() Only prevents the...

jeffkreeftmeijer.com

Back when Steak was first released, Capybara didn’t have any of the nice RSpec helpers it does now. A...