Coding
Layout tips using Ruby on Rails
When you don't need a sidebar
One issue I encountered with using my approach to Rails layout is when my template doesn't have a sidebar. Since I have already defined a 'div' tag for the sidebar in the layout file, the generated HTML page will have an empty 'div' tag. If you use CSS (you use [...]
Flexible page layouts using Ruby on Rails
Your webapp would normally have some dynamic pages and a defined layout. A layout defines where to put the banner, the main navigation, dynamic content, footer, and other secondary contents like announcements. As a developer, you could be assigned to work one dynamic page (e.g. 'projects'), your buddy on another page (e.g. 'tasks'), and the [...]
Simplify the delete operation in you Rails app
In the Ruby on Rails application I am working on, I have a model 'Album' and a model 'Photo'. As you have guessed, each album can have many photos. This is a typical one-to-many relationship and can be coded like this:
PLAIN TEXT
RUBY:
class Album <ActiveRecord::Base
has_many :photos
end
class Photo <ActiveRecord::Base
belongs_to :album
end
Since I want to have [...]
Getting my feet wet with Unobtrusive Javascript for Ruby on Rails
Got a link from fellow Filipino Ruby on Rails programmer Mark about a plugin that allows your Ajax-powered application to degrade gracefully when JavaScript is turned off. This is important because every user can choose to turn off JavaScript in their browser. If you rely solely on JavaScript, then your application will not behave properly [...]
YourSoftware 1.0 is an experiment
In college, I was a member of the UP Computer Society. There were a lot of geeks in our organization but its members have interests beyond computers. Every year we sponsor a quiz show called 'TrivBits'. It is an ordinary quiz show like Battle of the Brains with a few twists:
1. Categories are selected in [...]
Ruby on Rails. Love it. Hate it.
I'm sold to using RoR in my web applications but I still love to read analysis exposing the "dark" side of Ruby, and Ruby on Rails. When fellow programmers cite the weaknesses of a language (or tools) that we use, we can learn how to use it better and not fall into traps. It will [...]
Writing requires more brainpower than coding
Everyday I try to work with my pet software SchoolPad. There are times I get home early and with a lot of energy left, I pour in 3-4 hours of coding in Ruby on Rails. When I'm a bit tired, I only explore the application and write comments and ideas on my handy-dandy notebook. Sometimes, [...]
Are you using Ruby on Rails?
If you are based in the Philippines and using Ruby on Rails, please let me know. I am compiling a list of RoR-written web applications. Email me or leave your URL and a brief description of your work.
Thanks.
Share This
Why you should start learning Ruby on Rails
Ruby on Rails (or RoR) is a web-application framework that is rapidly gaining acceptance among web application developers. Even Java and PHP experts are recommending Ruby on Rails because of its capability to build applications with less time and effort compared to Java and PHP.
While it is true that Ruby on Rails is still not [...]
Why is creating software difficult?
"Design consists of creating things for clients who may not know what they want, until they see what you've done, then they know exactly what they want, but it's not what you did."
I forgot where I got this quote
Share This


