On Thu, May 5, 2011 at 8:00 PM, Jarrod Roberson <[email protected]>wrote:
> I am not a Ruby person, but it is about the only environment I don't know. > Where should I go look other than the source, which I have tried, and still > came up wanting? > Rails is built on the MVC (Model-View-Controller) principle; the console gives you access to (at least) the Model layer of the Rails app. This means you should be able to do anything the controllers do, except for what has to do with request/response handling. So if you look at the source code for the controllers (in app/controllers) you'll see code that you should be able to interact with in the same way as the controllers do. Furthermore, Gitorious includes a large number of unit tests (see test/unit) that excercise the same API, with descriptions of what's going on. So let's say you want to find out how names of wiki pages in Gitorious are validated, you pop up test/unit/page_test.rb. Toward the end of that find, you'll find a few tests describing some valid and invalid page titles. Cheers, - Marius -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
