aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer
diff options
context:
space:
mode:
authorJoel Chippindale <joel.chippindale@gmail.com>2008-11-11 09:45:53 -0600
committerJoshua Peek <josh@joshpeek.com>2008-11-11 09:46:29 -0600
commitc65075feb6c4ce15582bc08411e6698d782249a7 (patch)
tree24f4f15871daeb3cf4582c168a01c844f86d2b73 /actionmailer/lib/action_mailer
parenta62e9e90d8f47a643c9355f782ab4891fa8fefaa (diff)
downloadrails-c65075feb6c4ce15582bc08411e6698d782249a7.tar.gz
rails-c65075feb6c4ce15582bc08411e6698d782249a7.tar.bz2
rails-c65075feb6c4ce15582bc08411e6698d782249a7.zip
Fixed method_missing for ActionMailer so it no longer matches methods where deliver or create are not a suffix [#1318 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 17b5eaa8d1..19ce77ea5a 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -391,6 +391,7 @@ module ActionMailer #:nodoc:
when 'create' then new(match[2], *parameters).mail
when 'deliver' then new(match[2], *parameters).deliver!
when 'new' then nil
+ else super
end
else
super
@@ -442,7 +443,7 @@ module ActionMailer #:nodoc:
private
def matches_dynamic_method?(method_name) #:nodoc:
method_name = method_name.to_s
- /(create|deliver)_([_a-z]\w*)/.match(method_name) || /^(new)$/.match(method_name)
+ /^(create|deliver)_([_a-z]\w*)/.match(method_name) || /^(new)$/.match(method_name)
end
end