How is Rails structured to follow the MVC pattern?
The SQL table is taxis – the pluralisation of the model. In our project we have 2 tables as passenger_origin and passenger_destination, where the table row = an object instance and each of the columns = an object attribute.
The controller methods live in app/controllers/taxi_controller.rb
Each controller can access templates to display the input screen and methods for action.
In Rails, the view is rendered using RHTML or RXML. According to the wiki page at http://wiki.rubyonrails.org/rails/pages/UnderstandingViews, RHTML is HTML with embedded Ruby code and RXML is Ruby-generated XML code.
No comments:
Post a Comment