similar to: how to apply before/after_filter to actionmailer

Displaying 20 results from an estimated 40000 matches similar to: "how to apply before/after_filter to actionmailer"

2006 Jul 17
4
how to do url encoding for given text in rails?
hi, for example, I have an string "q1 q2 q3". how can I encode it in rails to produce the result like "q1%20q2%20q3". Thanks! Best Regards, Zhenjian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060717/3824f992/attachment.html
2006 May 11
1
rendering in after_filter
Hi! Is it possible to render the action within the after_filter method, or is the rendering performed before? I have something like this: class FooController after_filter :send def a @content=... end def b @content=.. end protected def send send_data(@content,...) end end However, when calling the action a or b, the @content doesn''t get sent, but instead
2006 Feb 08
2
ActionMailer EOFError (sometimes)
I''m having problems sending emails sometimes using ActionMailer. Looks like some emails are never sent because something breaks when sending it. It is a small quantity but can''t even have one drop. Browsing through the list I saw that one person had the same error as I did but in his case he couldn''t send any emails and in the end he needed no authentication at all.
2006 Sep 22
6
Using after_filter to control rendering on actions
I have a common failure page that I may need to render to upon failing some test that occurs in an after_filter method. I''d like to use the after_filter to take over the control of the rendering, like so: def test_for_validity some_boolean = my_test return render(:action => ''disqualified'') unless some_boolean @success_controller ||= controller_name
2006 Feb 20
3
Rewriting with an after_filter
All - I''m completely new to RoR and also new to programming in an MVC structure... The Pragmatic Programmers guide to Rails says, temptingly: "After filters can be used to modify the outbound response, changing the headers and content if required. Some applications use this technique to perform global replacements in the content generated by the controller?s templates (for
2006 Nov 04
6
image_tag keeping add ???? after the url it generates
hi, all, I have a problem with image_tag, the url it generates keeps adding ???? at the tail. e.g. src="/images/gicon.jpg?1153577588??????????" src="/images/gicon.jpg?1153577588?????????????????" I''ve checked the source code of image_tag, and couldn''t find any solution. The ???? is appended to the "source" parameter before it goes to the real
2007 Nov 12
1
help debugging ActionMailer with restful_authentication?
In a nutshell, I''m using restful_authentication that emails the user when they sign up for an account The development.log file shows the body of the e-mail message being prepped to send out, but doesn''t show confirmation that it made it. When I use gmail''s SMTP server, a Rails exception is thrown because gmail expects an encrypted connection. A different type of Rails
2006 Jul 18
1
Gmail for your domain and actionmailer
Hi, everybody somebody knows like config actionmailer to use it with gmail for your domain. thanks. -- Juan Pablo Re. blog: http://ururails.wordpress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060718/b2435a9a/attachment.html
2009 Jul 14
1
How to add after_filter-style render
Hello I would like to execute specific action rendering something into page after each of my ajax calls. In example I would like to update some div or display an alert. How I imagine it could work is as follows class ApplicationController < ActionController::Base after_filter :do_something_after_each_ajax_call def do_something_after_each_ajax_call if request.xml_http_request?
2006 Jul 21
3
ActionMailer doesn''t send any mail
I''ve configured actionmailer following the documentation, adding to environment.rb everything for using my mail account on yahoo using deliver_* methods to send a mail. I can see the mail in development.log and everything seems fine, but no mails so far. Is there a place where can I see what the server answered, or something to look at to solve the problem ? I have no clue,
2006 Mar 21
0
cache and exception safe around_filter (after_filter)
Hi, I was wondering if there is a feature or construct in rails that is guaranteed to run after an action like an around_filter (or after_filter) but will still run regardless of a broken filter chain or thrown exception? Currently I have an around filter setup, and I really require the after part of the filter to run, although if the filter chain is broken via cacheing or an exception is
2009 Feb 22
0
Using after_filter to remove image after render
Hi Everyone, I tried doing this and it''s not working as I would expect it, but I''m not sure if it''s even possible. I have an app that generates and image on request and displays it to the user. To cut back on storage, and some security, I''d like the app to receive the view request, render the image, display it, then delete the file. I know this isn''t
2006 May 21
3
Sending mail times out (ActionMailer)
Hi! I''m on debian. Sending a mail from Rails times out: Timeout::Error (execution expired): /usr/local/lib/ruby/1.8/timeout.rb:54:in `new'' /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'' /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'' /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout''
2006 Mar 09
0
Sending files other than html via Actionmailer
I''ve been trying to set up to send already generated PDF''s via the ActionMailer class however it dosn''t seem to send the full file. So when I try to load the file after being sent it via email it dosn''t because it is corrupt. When I choose to send HTML instead it sends fine but it dosn''t work with Word Documents either Do I need to do anything special
2006 Jan 16
1
ActionMailer Funkiness
I spent today getting a mailer setup locally. Everything was well so I commited my changes and went about making sure it was working on the production box. Well, it wasn''t. Here''s the setup. I have a method in my Statistic model that send the mail through a method in a mailer. I am using script/runner to send this mail periodically. When I use this: ----- script/runner
2006 Aug 09
3
Can''t update actionmailer gem?
Trying to update actionmailer gem, and it''s complaining about the version of actionpack not being correct. C:\eclipse\workspace>gem update actionmailer Updating installed gems... Attempting remote update of actionmailer Install required dependency actionpack? [Yn] Y ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find actionpack (= 1.12.4) in the repository
2006 Feb 06
6
ActionMailer - ROR Recipes - Multipart/alternative
I am using the SaltedHashLoginGenerator. and would like to send the e-mail in multipart/alternative format. By default my application is using forgot_password_en.rhtml template. I read in the ROR Recipes book "ActionMailer sees these templates, recognizes the pattern in their file names, and automatically sets the MIME type of the message to multipart/alternative and adds
2008 Apr 09
0
Understanding ActionMailer::Base.new
While writing a small plugin I stumbled upon this strangeness. I have TMail objects stored in database for process that sends them out whenever needed. Obvious way of sending them out would be calling ActionMailer::Base.deliver(my_mail_object) That works just fine. However I have method chain hooking into instance method deliver!: alias_method_chain :deliver!, :something_crazy so I need to
2007 Aug 10
1
ActionMailer and Dreamhost
Hello, I am running my RoR app on localhost and am trying to implement ActionMailer. In my environment.rb config file, I am pointing to my smtp server on Dreamhost: ActionMailer::Base.delivery_method = :sendmail ActionMailer::Base.server_settings = { :address => ''mail.domain.info'', :port => 25, :domain =>
2006 Jun 20
0
An after_deliver filter for ActionMailer?
I have a mailer that should update a model once an email is delivered (a "notice sent on" field). I don''t want to put this update code in the email creation method of my ActionMailer::Base class because I''d rather have this field updated when the email is _sent_ rather than when it is _created_. Is there a filter such that I could do something like this?