Displaying 19 results from an estimated 19 matches for "template_root".
2006 Jun 16
0
Strange problem with ActionMailer
I have the following code to send out email notifications. The view
can vary for each call to signup_confirmation, so I''m setting
template_root on each call in order to do that. It works for a while,
but after a few days it will start using a value of signup_path that
was used in a previous call. In other words, Notifier.template_root =
signup path does not actually set Notifier.template_root to the value
of signup_path. Instead it see...
2006 Jun 21
0
Possible bug in actionmailer
I have the following code to send out email notifications. The view
can vary for each call to signup_confirmation, so I''m setting
template_root on each call in order to do that. It works for a while,
but after a few days it will start using a value of signup_path that
was used in a previous call. In other words, Notifier.template_root =
signup path does not actually set Notifier.template_root to the value
of signup_path. Instead it see...
2008 Mar 12
0
CMS act_as_tree problem and template_root
Hi,
I want use the comatose CMS plug in for creatin one application.
I installed all the things.
When I run this application I got this error.
"template_root".
Please clear my problem. And How can I create one application by using
the comatose. Please send the sample application if available.
Thank you,
srinivas rao.pala
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message be...
2007 Aug 15
5
Misc notes concerning view_paths
...''ve been playing in the trunk with putting stuff in different dirs
to keep files from a reusable framework separate from the app files.
Here are a few considerations regarding the view_paths setting:
config.view_path is used to set both action_controller.view_paths and
action_mailer.template_root. We get some buggy/unexpected behavior
here because action_controller.view_paths can be an array or a
string, while template_root is a single string. config.view_path can
be set to either a string or an array, as there''s basically no type
checking, but that doesn''t mean it...
2007 May 13
2
ActionMailer outside of Rails?
Has anyone used ActionMailer outside of rails? I have a requirement for
work that will not allow me to do this from within a rails app. I have
successfully sent an email in the following manner:
MyMailer.deliver_clever_email(someArg,''testing!'')
where the second argument is the body of the email, but when I try to
call just:
MyMailer.deliver_clever_email(someAr)
and use a
2006 Aug 07
9
problems with ActionMailer
Hi all,
I''m trying to create a worker to send a mail to all the users in my
db. Right now I''m doing the tests, this is the code in my worker
(Masivo is the ActionMailer subclass):
def do_work(args)
@progress = 0
@logger.info("MAILER: starting job")
records = Record.find(:all)
total = records.size
records.each_with_index do |record, idx|
2008 Mar 24
2
render not able to locate template in publisher
Hi guys,
I have a publisher called UserPublisher setup in models directory of
my app. The reason I have it in a model is because its then possible
for me to invoke publisher methods in after_callbacks of my other
models, just the way we do it for ActionMailer.
My problem is that when I try to update a users profile specifying
location of the view template as a paramater to "profile"
2007 Dec 08
6
Rails 2.0 ActionMailer breaks my redmine render_message
...der_message(method_name, body)
layout = method_name.match(%r{text\.html\.(rhtml|rxml)}) ?
''layout.text.html.rhtml'' : ''layout.text.plain.rhtml''
body[:content_for_layout] = render(:file => method_name, :body =>
body)
ActionView::Base.new(File.join(template_root, ''mailer''), body,
self).render(:file => layout)
end
end
the last line is not accepted when running rails 2.0 => ERROR
ActionView::ActionViewError (Due to changes in ActionMailer, you need to
provide the mailer_name along with the template name.
render "user_mailer...
2008 Jan 03
3
Whats the merb equivilant of this?
Hey All
Quick question, what''s the merb equivalent of this:
ActionView::Base.new([template_root], assigns, self)
in merb? Ive found
Merb::Template::Erubis.transform(:file => ''/path/to/file'')
But I''ve no idea if thats the correct thing to be calling? It doesn''t
''feel'' right, so im not sure it is?
Thanks
Tim
2011 Mar 04
1
How to modify the template path for ActionMailer used in a Ruby script ?
...t|
format.html
format.text
end
end
end
I believe there is something wrong with the :template_path =>
''notifications'' parameter...
I tried a relative path : " ./notifications" same error raised
I also tried to define upon initialization : TEMPLATE_ROOT = "./
notifications" in the joinus_email.rb script , same error raised ...
any suggestions ?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocF...
2006 Aug 12
1
Multiple args
...:args => { :recipients
=> recipients, :mailing => mailing },
:ttl => 800 )
mail_queue_worker.rb:
================
require File.dirname(__FILE__) + "/../../config/environment.rb"
ActionMailer::Base.template_root =
File.expand_path(File.dirname(__FILE__) + "/../../app/views")
class MailQueueWorker < BackgrounDRb::Rails
attr_accessor :progress
def do_work(args)
@progress = 0
@logger.info("MailQueueWorker: start sending newsletter
#{args[:mailing].title}")
@logger.inf...
2011 May 20
5
views w locale default template
[RAILS3]
I hesitate on how handling the locale view templates to default to
one language only ..
sending admin emails will go only to one locale ''en_GB''
should I set it up into the template name and set I18n.locale to
''en_GB''
membership_renew.en_GB.html.erb
OR
whatever locale is used , if I have :
membership_renew.html
it will be the default ?
--
2006 Feb 05
4
Another layout question - Layouts on a per method basis - Layouts with AJAX
I feel I am very close to understanding how layouts are used in Rails:
Q1. I know one can specify a "default" layout for all methods in a controller by specifying
layout ''my-default-layout''
How can this be overridden for individual methods so when those methods are called/executed, the overridden layout will be used. Is this possible?
Q2. With no
2006 May 18
3
Render layout on the fly
Hi guys,
i was wondering if there is any possibility to render a layout on the
fly instead of putting it into the layouts/ folder. Any ideas?
--
Posted via http://www.ruby-forum.com/.
2006 Jun 16
0
rake spec controller test output hideus.
...e, @cookies={},
@base_path="/Users/jgb/Development/Rails/learningruby/config/../app/views",
@flash={:warning=>"Signup unsuccessful"},
@session=#<ActionController::TestSession:0x24d6a74
@attributes={"flash"=>{:warning=>"Signup unsuccessful"}}>,
@template_root="/Users/jgb/Development/Rails/learningruby/config/../app/views",
@assigns={"template_root"=>"/Users/jgb/Development/Rails/learningruby/config/../app/views",
"user"=>#<User:0x24d48a0 @attributes={"name"=>nil,
"salt"=>"CR...
2007 Oct 02
19
Per-Request View Paths
I haven''t had a chance to work on fixing multiple controller view paths
recently. My original patch attempt was:
http://dev.rubyonrails.org/ticket/8582
It was rejected due to the fact that it was fixing the symptom more than the
problem.
However, I think it''s critical that this problem get fixed, otherwise the
whole concept of view_paths is severely neutered and
2007 Mar 23
4
DRY - with modules, render_component or.. ?
I have an B2B application where a pretty complex order form needs to be
submitted and edited on the admin controller, buyer controller and
seller controller with some small differences.
How do I make available the edit order methods all controllers?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2006 Mar 20
2
Rails Plugin to Help Debug Views
Hi,
I just released a plugin to help debug views. The plugin makes it easy
to add a button that will popup a new window that displays the
following debug data;
* Request Parameters
* Session Variables
* Flash Variables
* Assigned Template Variables
It was derived from code that traces back to Marten Veldthuis in
Epilog. You can check out webpage and plugin via;
2005 Dec 24
10
can''t find view from Mailer?
Hi everyone,
Like so many other here, I too am new to Rails (and Ruby), and so far
it''s been a great experience. I haven''t been able to get around one
problem though. When trying to use the mailer, I recieve an error like
this:
ActionView::ActionViewError in Tell_friend#send_email
No rhtml, rxml, or delegate template found for send_to_friend
The scenario is this:
A form on