Displaying 20 results from an estimated 30000 matches similar to: "Separating views by locale?"
2005 Dec 18
3
undefined local variable in partial
i can''t get rid of the following error:
ActionView::TemplateError (undefined local variable or method `order_line''
for #<#<Class:0xb75b2090>:0xb75b1f28>) on line #13 of
app/views/admin/_order_line.rhtml:
10:
11: <tr valign="top">
12: <td>
13: <div class="olnamebox"><%= h(order_line.name) %></div>
14:
2010 Nov 04
0
Re: Train wreck getting render_to_string to work from foreign controller [SOLVED]
Just for collective knowledge as I have found no info on this problem
online:
I solved this by adding an .html.erb file for the "missing template", since
by design or bug Rails3 will not find or render another controllers view (in
my experience). Then in the new html.erb file, I just put <%= render
"comparisons/display" %> because the views *are* able to find templates
2006 Oct 26
2
Mocha and SimplyHelpful
Hi,
I''m getting a conflict between the Mocha plugin and the Rails
SimplyHelpful plugin.
For some reason the dom_id method from SimplyHelpful is not being
found in my views when the Mocha plugin is installed. The dom_id
method if used in the controller works properly.
This is the error I get when running the tests:
1) Error:
test_truth(HmmControllerTest):
2008 Mar 15
3
problem with config file
Hey there all
if i have this in my gmap_api_key.yml file,
production:
ABQIAAAASPzYuwhUCPD9Vz98LPOPDhQXfahRKLczKzlJSy9lXc0oaHHYcxTFTjWleXY7LH-N3IAp9ruoqiU43w
everything works fine but if i have this .....
production:
texaspivot.com:
ABQIAAAASPzYuwhUCPD9Vz98LPOPDhQXfahRKLczKzlJSy9lXc0oaHHYcxTFTjWleXY7LH-N3IAp9ruoqiU43w
i get this
ActionView::TemplateError (texaspivot.com) on line #1 of
2006 Jan 22
2
Using register_template_handler to serve CSS files (Making ActionView handle .css as .rhtml)
Hi,
I wanted to be able to use some Rails code inside CSS files, so I set up
a controller (StylesController) to serve CSS files that reside inside
the controller''s view folder when the browser requests /stylesheets/:action
So in the controller I just define empty actions with the names I want
my style sheets in (ie: def cooleffects end - that would respond to
2007 Nov 06
2
Why is this view spec failing?
I can''t figure out why I am getting a failure. It renders out fine in
the browser.
<h1>New member</h1>
<%= error_messages_for :member %>
<% form_for(:member, :url => members_path) do |f| %>
<fieldset>
<legend>Member Info</legend>
<p><label for="member[first_name]">First Name:</label> <%=
2005 Oct 14
2
Capture template output as plain html?
Hi,
I''m trying to find out if the following is possible.
I have a rhtml template stored in the database as a string. I need to
process the template (as a string), similar to using ActionView''s <%=
render_template("rhtml", @template_string) %>, but I need to do this in the
ActionController and capture the result as a string.
There is a method
2007 Oct 01
0
View Spec - Misbehaving
I''m trying to write my first view spec; I''ve done some controller specs with
integrated views, but thought that isolating the views for some of these
tests might be nice.
So I wrote this:
> describe PlayerContainer, "show" do
>
> PARENT_ID = 12
> CHILD_NAME = ''Child Name''
> PARENT_NAME = ''Parent Name''
>
>
2007 Aug 30
1
alias_method_chain stack level too deep in Rake test only
I have an odd error. I have the following module:
module ActionController
module SslSupport
def self.included(base)
raise "#{base} does not define url_for" unless
base.method_defined?(:url_for)
unless base.respond_to?(:url_for_without_ssl_supprt)
base.send :include, InstanceMethods
base.send :alias_method_chain, :url_for, :ssl_support
end
2005 Mar 17
2
Using gettext to localize your rails app
Hi,
I am having some trouble finding out how best to use ruby-gettext in my
app. I do this in my ApplicationController:
before_filter :localize
private
def localize
# we will always use UTF-8
@charset = ''utf-8''
@headers["Content-Type"] = "text/html; charset=@charset"
# simplified approach: extract the first language from the request
# or use
2006 Apr 18
1
''wrong number of arguments'' for text_field?
This is probably something very simple but I can''t seem to figure out
why I keep getting the ''wrong number of arguments (1 for 2)'' error with
the following code when I try to create a new record. If anyone can see
what is going wrong here please help!
new.rhtml
-------------------------------------------------
...
<%= start_form_tag :action =>
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
Problem:
1. ERB and Builder template engines are heavily wired in ActionView::Base
2. Should be optional. If we use different engine - why load all their
stuff if not needed?
3. There are template engines which expect files in their own locations
and cache them in their own way. For instance a template engine may
store templates in a database. These engines don''t need any central
source
2006 Feb 06
2
basic usage confusion
I am confused. Looking at ''list'' from scaffold, I see a record and click
the ''show'' button. I put in a ''link'' at the bottom of ''show.rhtml'' to my
''view'' rfn2.rhtml - action = ''rfn2'', :id = @placement
I click this link and get error...
log/development.log
Processing
2007 Nov 23
4
How to pin down location of views/shared directory ?
My app has a header & footer I want common to each section.
They live in app/views/shared/_header.rhtml & _footer.rhtml.
They are referenced by app/views/layouts/application.rhtml as one would
expect:
<div id="header">
<%= render :partial => ''shared/header'' %>
</div>
They contain many lines like this:
<a
2009 Jul 28
0
[PATCH 3/5] Storage views patched for glusterfs drop down as one the Storage Pools
---
src/app/views/storage/_form.rhtml | 2 ++
src/app/views/storage/_list.rhtml | 4 ++++
src/app/views/storage/_list_volumes.rhtml | 4 ++++
src/app/views/storage/show.rhtml | 4 ++++
.../views/storage_volume/_new_volume_form.rhtml | 1 +
src/app/views/storage_volume/show.rhtml | 8 ++++++++
6 files
2008 Jan 25
1
form error with datetime select
Hi, Im trying to build a form using:
<% facebook_form_for(:task, at task,:url => create_task_path) do |f| %>
Assign Task To: <%= fb_friend_selector %>
<%=f.text_field :ttype, :label=> "Title"%>
<%=f.datetime_select :duedate, :label=> "Due Date"%>
<%=f.buttons "Add" %>
<% end %>
But im getting an
2009 Jul 09
0
[PATCH 3/5 ovirt-server] Storage views patched for glusterfs drop down as one the Storage Pools
---
src/app/views/storage/_form.rhtml | 2 ++
src/app/views/storage/_list.rhtml | 4 ++++
src/app/views/storage/_list_volumes.rhtml | 4 ++++
src/app/views/storage/show.rhtml | 4 ++++
.../views/storage_volume/_new_volume_form.rhtml | 1 +
src/app/views/storage_volume/show.rhtml | 8 ++++++++
6 files
2009 May 22
1
rails 2.3.2, active scaffold, nested, ActionView::TemplateError (undefined method `format_column' for #<ActionView::Base:
Before I dig in any further (since I have no idea where to go from
here...)
Has anyone been succcessful with 2.3.2, AS, and nested scaffolds?
I have the latest of AS and the render_component plugin via
% script/plugin install --force git://github.com/lackac/render_component.git
-r rails-edge
I have an AS user_controller:
active_scaffold :user do |config|
...
2007 Dec 08
6
Rails 2.0 ActionMailer breaks my redmine render_message
I am using ''redmine'' (v 0.6) as my major project manager, seems running
fine w Rails 2.0 (slight modifs for paginations..) but I am stuck with a
major error when sending a confirmation email :
mailer.rb
class Mailer < ActionMailer::Base
....
# Renders a message with the corresponding layout
def render_message(method_name, body)
layout =
2006 Jan 11
5
stack level too deep problem
Hi all, I''m trying to overload the link_to function, (to disable link_to if
the user has no access right)
this is my code, it work the first time I run the application, the second
time I refresh the page I always get "stack level too deep error"
module UsersHelper
include ActionView::Helpers::UrlHelper
alias_method :link_to_original, :link_to
def permission?
true