search for: compiledtempl

Displaying 9 results from an estimated 9 matches for "compiledtempl".

2011 May 06
3
Reading Yaml files and getting an 'uninitialized constant ActionView::CompiledTemplates' Error
Want to load a configuration from a yaml file ala config/database.yml. I am following http://blog.innovativethought.net/2009/01/02/making-configuration-files-with-yaml-revised/ but, I am getting uninitialized constant ActionView::CompiledTemplates::DOMAIN_CONFIG from rails. I''ve documented my code to make this simpler. I''m running Rails 3.0.7 I know isn''t the toughest question but, I would also like to know why isn''t that constant available in the views? Do I have to wrap that constant in a Ruby...
2010 Apr 16
1
time_zone_select :priority_zones not working properly
...rs::FormOptionsHelper I''m getting errors. Here is an API docs example: time_zone_select( "user", ''time_zone'', TimeZone.us_zones, :default => "Pacific Time (US & Canada)") When using this code I get "uninitialized constant ActionView::CompiledTemplates::TimeZone". The first thing I noticed was that TimeZone is camel cased. This seems confusing to me considering TZInfo::Timezone is proper cased. I tried using proper cased Timezone and continued to get the same error. Next, I tried using TZInfo::Timezone, this worked. time_zone_sele...
2006 Jul 06
6
Class variables in templates/layouts
...uot;mylayout" @@tab = "mystring" [... the rest is standard scaffold-created stuff ...] and a layout (mylayout.rhtml): [...] <title><%= @@tab.capitalize %></title> [...] And I keep getting this error: uninitialized class variable @@tab in ActionView::Base::CompiledTemplates I''ve searched the net and come up dry. Ruby docs say I''m supposed to initialize class variables before I can use them but I''d assume that the `` = "mystring" `` would count as initializing it... -- Posted via http://www.ruby-forum.com/.
2010 Apr 08
4
NameError - Problems with if-else
Hi, i have a problem with if-else. I get this error: "uninitialized constant ActionView::Base::CompiledTemplates::Male" I want to change the background-color for male and female. So i wrote this code with if and else. I think there is a mistake in line 8. How could this work. What do i have to write? 5: <% for article in @articles %><br /> 6: <table> 7: <%= h article.ge...
2006 Oct 23
0
What does this mean -uninitialized constant ActionView Base
Full error: uninitialized constant ActionView Base::CompiledTemplates Not sure here. I have a controller, model and views for something called ''cana'', Howere I also have a model and a table called ''canb''. In the show template for ''cana'' I''m attempting to do: <% @canbs = Canb.find(:all) %> &l...
2009 Feb 26
0
Using form_for and has_many associations with a controller in its own subdirectory
...e: 0x25ad3fc> The path that I think I need is ''blog_post_comments_path", and I''m not sure if this is a routing issue or something else? Or, if I try this line: <% form_for [@post, :Comment.new] do |f| %> I get this error: uninitialized constant ActionView::Base::CompiledTemplates::Comment I''m guessing it couldn''t find the Comment Controller because it is actually Blog::Comment Currently, I have this in my routes file: map.namespace :blog do |blog| blog.resources :posts, :has_many => :comments end Any advice would be greatly appreciated,...
2009 May 20
1
templating language questions
...ogiri, which is fast). I noticed that the erb and haml templating integrations are compilable - that is, they seem to return a string containing a representation of the template with ruby statements to be evaluated against the local scope; this string is stored as a method on ActionView::Base::CompiledTemplates. The code is in ActionView::Renderable. At any rate, my approach doesn''t do this at all - it simply interprets the template, renders it, then passes it back. This is working very well for the prototype and I''m happy with it. I wanted to ask if anyone had experience in this...
2010 Apr 15
0
[Rails v3] time_zone_select :priority_zones not working properly
...Helpers::FormOptionsHelper I''m getting errors. Here is an API docs example: time_zone_select( "user", ''time_zone'', TimeZone.us_zones, :default => "Pacific Time (US & Canada)") When using this code I get "uninitialized constant ActionView::CompiledTemplates::TimeZone". The first thing I noticed was that TimeZone is camel cased. This seems confusing to me considering TZInfo::Timezone is proper cased. I tried using proper cased Timezone and continued to get the same error. Next, I tried using TZInfo::Timezone, this worked. time_zone_select( &...
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor In Expense#new there''s a form with a Vendors-drop-down and a NewVendor- button. The latter button brings up Vendor#new. The Create button in Vendor#new brings up Vendor#show with Edit & Back links. I want to append a third link conditionally to Vendor#show: if the Expense#new form led to the Vendor#show