November 6th, 2009, 03:19 AM
ROR confusion using methods
Okay, I am very new to ruby. I have written several standard ruby programs and now I am starting to learn ROR. I am a bit confused though. In a standard ruby program I create a method and then in the main program I pass a variable to the method and have the method print out a value. Now, I know I use the controller file and the index file to do this, but I am unsure exactly how to include the method and to call it.
I need to do something like this in ROR, but I am not sure just how. It is simple in just a standard ruby program. Any help would be appreciated.
November 25th, 2009, 04:33 PM
If it's just a "standard ruby program," why are you using Rails?
Also, google "MVC" and click the first link.
August 23rd, 2010, 12:18 AM
Suggest you visit rubyonrails DOT org and try the tutorial to see how to build a rails app from scratch. That will show you the basic conventions. From there you should be able to map your application to the rails framework.