search for: view_controller

Displaying 2 results from an estimated 2 matches for "view_controller".

Did you mean: new_controller
2006 Aug 15
5
ActiveRecord inheritance
...d) for some my models (lib/classes_lib.rb): class AccountExtended < ActiveRecord::Base def self.findByAccount end end #2. created model Country: require ''lib/classes_lib'' class Country < AccountExtended end #3. and added a test controller what shows an issue (view_controller.rb): class ViewController < ApplicationController def index @countries = Country.find(:all) end end index.rhtml: <table> <% @countries.each do |c| -%> <tr><td><%= c.full_name %></td></tr> <% end -%> </table> (it is simply a skelet...
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
...per an action. Why is it problem for me? I wrote a ViewController templating engine. ViewController is similar to Controller - is just one file, a class, which controls views of all actions. It uses yaml data files from which loads data. It is real push-style template engine. app/views/foo/foo_view_controller.vcrb class FooViewController < ActiveView::ViewController::Base def index return get( :body ) do |body| body.title = ''Homepage'' body.time = Time.now body.table do |table| @people.each do |person| table <&l...