Upgrading to Rails 2.0. A Recipe
Upgrading to Rails 2.0. A Recipe
In previous posts, I’m covered some of the updates to Rails 2.0 and how to prepare for Rails 2.0 but haven’t really covered the mechanics of HOW to upgrade to Rails 2.0. So as part of the 6 things to try in Rails this year series, I have compiled a quick recipe that works for […]
In previous posts, I’m covered some of the updates to Rails 2.0 and how to prepare for Rails 2.0 but haven’t really covered the mechanics of HOW to upgrade to Rails 2.0. So as part of the 6 things to try in Rails this year series, I have compiled a quick recipe that works for me. It probably isn’t the only method, but it works.
1. Fix all of the deprecated warnings
The easiest way to do this is to download Geoffrey Grosenbach’s rake task that I previously mentioned. Copy it to the lib/tasks directory of the app you want to upgrade and run
rake deprecated
This will point you in the direction of any deprecated methods. Find them and fix them.
2. Cleanup your environment
I used to put a lot of code in the enviroment.rb file, which is really a bit of a no-no. To facilitate this, the Rails team introduced the initializers directory where you can add custom code that is automatically loaded at run time. You will need to create the directory now, so run
mkdir config/initializers
Create a new ruby file under that directory and move any custom code, mime types and inflectors from the enviroment.rb files.
3. Update the engine
Even though a lot of the Rails engine is provided by the Rails gems, there is some boiler plate code that each app needs. This is created when you run the rails /path/to/app command. Well, to ensure that everything is up to date, we will do the same thing again. The rails command is smart enough to compare files for differences before overwriting them.
rails /path/to/your/app
You should now be asked “overwrite [file]? (enter “h” for help) [Ynaqdh]” for a whole bunch of files. Double check each filename before hitting yes - some of the files you WON’T want to overwrite (Examples are 404.html, 500.html, database.yml etc). If it is a configuration file you probably won’t want to overwrite it. It will also update the JavaScript libraries, so if you are reliant on those, you may want to say no there too.
I’ve found this is the best way to make sure everything is up to date.
4. Update the views
Whilst not strictly required, I found a rake task in this article that renames .rhtml files to .html.erb which is nice for consistency.
For a standard Rails install that doesn’t use any of the deprecated plugins, that should be it! Let me know if you find any other tidbits of wisdom.
This article provided by sitepoint.com.
7 Advanced CSS Menu, A Great Roundup!!
New techniques are being developed and updated all the time for creating unique menu techniques. We keep an eye on the recent developments and collect new ideas and methods for our readers and after all the great appreciation this post got 13 Awesome Javascript CSS Menus, i thought it would be nice to get you […]
New techniques are being developed and updated all the time for creating unique menu techniques. We keep an eye on the recent developments and collect new ideas and methods for our readers and after all the great appreciation this post got 13 Awesome Javascript CSS Menus, i thought it would be nice to get you a fresh round-up of 7 Advanced CSS Menus techniques, that might be useful for you in your next design project.
1) Advanced CSS Menu
Check out this great CSS advanced menu tutorial by Nick La, showing us how to slice up the menu design step by step and putting them together with CSS.
Note: there is an IE6 bug where the hover effect doesn’t display properly. To fix that, you can use Javascript to specify the to display block on mouseover.
2) Advanced CSS Menu Trick
A new concept by altering the non navigation items on hover state which will focus the user’s attention on the item they have hovered on, and create a new look and feel for the site overall. Works perfectly in any modern browser, yet still be fully functional in your older version of IE as well.
3) Son of Suckerfish Dropdowns
The Famous Suckerfish Dropdowns is now back and they’re more accessible, even lighter in weight (just 12 lines of JavaScript), have greater compatibility (they now work in Opera and Safari without a hack in sight) and can have multiple-levels.
4) Tree Frog slide and fly menu
This menu has a vertical sliding first sub level then two flyout levels and demonstrates how it is possible to change positional styling from ‘absolute’ and off screen to ’static’ and expanding the menu vertically.
5) Mike’s Experiment
A useful CSS technique for providing pop-up descriptive content by extending nav menus with tool-tips, alerts, notifications, or additional info.
6) 8 web menus you can’t miss
8 Great CSS based Menus, you just can’t miss.
7) Drop Down Tabs
Drop Down Tabs comes with 5 sleek examples to let you quickly pick your favourite to use on your site. Customize each example’s CSS to modify the look as desired. We got you covered alright!
You can find great resources at the links below:
- 13 Styles Focuses on CSS menu design and also offers free menus for download.
- 14 Free Vertical CSS Menus designed by exploding-boy, simple and various styles.
- CSS only drop-down menu
- Deluxe CSS Dropdowns and Flyouts
- Centered Tabs with CSS






