Friday, October 17, 2008

Solution For "rewrite" error

If you get this error, and the error message is pointing you to a “link_to” call or something similar, then you may be using an instance variable that’s called ‘@url’ too.

I finally discovered that, in my case, I was using ‘@url’ in the controller for the view where I was making the ‘link_to’ call.

Long story short, if you see this error, comb through your code (models, controllers and views) for any variables that are called ‘@url’ and change them.


Reason:

We should not use "url" word as controller name,model name,action name,attribute name ..
Apparently you can’t use “Class” as a class in Java either.

Yep, same as ‘private’, ‘public’, etc. With the slight difference that these are keywords at the language as oposed to framework level.


Solution:
Then simply replace url word with other..

Friday, August 1, 2008

Ruby on Rails

Ruby on Rails is an open source web application framework for the Ruby programming language. It is often referred to as 'Rails' or 'RoR'. It is intended to be used with the Agile development methodology, which is often utilized by web developers for its suitability for short, client-driven projects.

What's in the Rails package?

Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. From the Ajax in the view, to the request and response in the controller, to the domain model wrapping the database, Rails gives you a pure-Ruby development environment. To go live, all you need to add is a database and a web server.