Search
Categories
- Deployment (4)
- Development (63)
- Gems and Plugins (4)
- News (2)
- Projects (4)
- Testing (3)
Most Popular Tags
activerecord architecture collections css database date and time debugging design design patterns DRY ebooks fixtures floating-point numbers formatting framework front page global variables helpers I18n introductory launchpad meta-information migrations model multiplicity mvc MySQL partials production rails 2.0 rails 2.1 Rails 2.2 regular expressions routing rss ruby security setup sql UI upgrading user management validation xml xml builder
Tag Archives: design patterns
Singleton Classes
How can you create a singleton class in a Rails application? The same as in a Ruby application! Using Singleton gives you free functionality: it makes the constructor private, and it creates a static method called instance, to get the singleton instance. If you check equality for two singleton instances, they will always be equal. We discuss a brief example. Continue reading
Hello Rails! Autopsy – Smart MVC
Rails enforces separation of model, view, and controller code. Most tutorials encourage you to make a single controller per model. But there’s a smarter way you can use MVC–you can create one controller per user group. This gives you an easy, intuitive model of how users access your application, and provide all the logic per user-group in one location. Continue reading