Displaying 4 results from an estimated 4 matches for "viewcontroller".
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
...ay. For instance a template engine may
store templates in a database. These engines don''t need any central
source loader of files which they don''t need, moreover of files which
don''t exist. Files, which expects a file 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::ViewCo...
2006 Aug 15
5
ActiveRecord inheritance
.../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 skeleton)
then I start webrick,...
2006 Mar 09
0
Caching problem: expire_page not working
Hi all,
I''m new to rails and I''ve run in to a rather insidious bug. In
development (with caching turned on in development.rb), my app
successfully caches action "index" in controller "view":
class ViewController < ApplicationController
caches_page :index
def index
# do the stuff that index does
end
end
I''ve got a sweeper running in a different controller ("admin") which
expires view::index when changes are made to the underlying data. The
following line of codes...
2006 May 14
1
send_file, RRDtool, require or session problem
Hi all,
I am new to RoR and ruby, but am a very experience PHP developer. Let
me give an overview of the problem.
I have a model Latency, which contains username, graph_name so the
logged in user can see his/her latency graphs.
In my ViewController I have a fuction view_latency which pulls the
correct latency object and runs latency.overview. latency.overview
creates a .png file in /tmp, and view_latency then sends this using
send_file to an image tag on the man page.
latency.overview uses RRDtool(from rrdtool.rubyforge.org) to create the
....