You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you...
In a great post about named routes in Rails, path vs. url, Viget Labs ponders which variant is best used...
WMD is a simple, lightweight HTML editor for blog comments, forum posts, and basic content management. You can add WMD...
Expiration of Rails sessions By default Rails sessions expire when the user closes her browser window. To change this edit...
The following Haml will do: %head{ :profile => 'http://www.w3.org/2005/10/profile' } %link{ :href => image_path('favicon.ico'), :rel => 'icon', :type => 'image/vnd.microsoft.icon' }
There are two distinct ways of commenting Haml markup: HTML and Ruby. HTML comments This will create an HTML comment...
To return non-HTML responses (like XLS spreadsheets), we usually use the respond_to do |format| format.xls do # send spreadsheet...
Update RubyGems and Passenger Bundler requires Rubygems >= 1.3.6. Run gem update --system if you have an older version.
Sometimes files attain executable-flags that they do not need, e.g. when your Windows VM copies them over a Samba...
Use this if you want to show or hide part of a form if certain options are selected or boxes...
You can write regular expressions some different ways, e.g. /regex/ and %r{regex}. For examples, look here. Remember that it...
jamesgolick / resource_controller at Github module ResourceController module Actions def index load_collection before :index response_for :index end
Capybara does not play nice with sites that have some actions protected by SSL, some not. A popular way to...
Our awesome collection of rspec helpers (formerly known as "spec_candy.rb") is now available as a gem. It works, it is...
tinyMCE.activeEditor.getContent()
For example, to send a form and populate a preview div with the response. $('content_form').request({ parameters: { 'preview': "1...
In Webkit you can use the HTML5-attribute autofocus: = form.text_field :title, :autofocus => 'autofocus' Here is a jQuery fallback for...
Most of these will not work in newer projects because these use the Capybara/Rack::Test combo in lieu of Webrat...
Until May 2011 our gems have been created with Jeweler, which is a helper library to package code into a...
With defaults, RCov doesn't work the way you how you would like it to. To create a nice test...
To parse XML-documents, I recommend the gem nokogiri. A few hints: xml = Nokogiri::XML(" foo bar ") parses an xml...
See the lemonade descriptions. Unfortunately, the gem has a few problems: it does not work with Sass2...
This is about converting Haml to ERB and not the other way round which you probably want! This process can...
tmp/* storage/* db/*.sqlite3 db/schema.rb db/structure.sql public/system .project .idea/ public/javascripts/all* public/stylesheets/all* public/stylesheets/*.css config/database.yml *~ *#* .#* .DS_Store webrat-*.html