Reloading your Ruby on Rails console
1
Directory Utility for Ruby
1
By default, migrations will run on the development environment. Here's how you would specify another environment.
2
Well, ruby is actually so flexible that there is no real need to implement the goode olde signals & slots metaphor. But it serves nicely as demonstration of ruby properties, so here we go.
1
From time to time you may have reasons to override the default find method that ActiveRecord provides. In this example, we'll store a side-copy of the record attributes so that we have some basis for discovering changes to the data.
note: this will not override dynamic finders such as find_by_id
note: this will not override dynamic finders such as find_by_id
4
This will render a flash div only if there is a message in flash. Also will set the id to the flash key.
flash[:notice] returns
This is the notice
flash[:notice] returns
This is the notice
8
Customizable recursive directory scanner.
5
This class intended to collect TODO comments from java/c++/etc source files.
Example:
protected readFileData (String path) throws IOException {
// TODO: add try...catch block for IOException
InputStream is = new FileInputStream(path);
...
}
See also DirectoryScanner class.
Example:
protected readFileData (String path) throws IOException {
// TODO: add try...catch block for IOException
InputStream is = new FileInputStream(path);
...
}
See also DirectoryScanner class.
5
This class illustrates mixed GUI/command line parameters passing. Any parameter may be specified in the command line. All unspecified parameters will be read using GUI dialog box.
8
5
This snippet illustrates following:
1. Using http request to get the data
2. Parsing RSS feeds
3. Sending email
1. Using http request to get the data
2. Parsing RSS feeds
3. Sending email









