Class: FeedbackMailer
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- FeedbackMailer
- Defined in:
- app/mailers/feedback_mailer.rb
Instance Method Summary collapse
-
#feedback(host, to_address, options = {}) ⇒ Object
feedback(“findit.library.school.edu”, “[email protected]”,:name => “Joe”, :email => “[email protected]”, :feedback => “Whatever”, :umlaut_request => urequest) * umlaut_request is optional.
Instance Method Details
#feedback(host, to_address, options = {}) ⇒ Object
feedback(“findit.library.school.edu”, “[email protected]”,:name => “Joe”, :email => “[email protected]”, :feedback => “Whatever”, :umlaut_request => urequest)
* umlaut_request is optional
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/mailers/feedback_mailer.rb', line 8 def feedback(host, to_address, = {}) @host = host @umlaut_request = [:umlaut_request] @name = [:name] @email = [:email] @feedback = [:feedback] # Force permalink creation if we don't have one already if @umlaut_request && @umlaut_request.referent.permalinks.empty? permalink = Permalink.new_with_values!(@umlaut_request.referent, @umlaut_request.referrer_id) @umlaut_request.referent.permalinks << permalink @umlaut_request.save! end mail(:to => to_address, :subject => "#{UmlautController.umlaut_config.app_name} Feedback: #{[:name]}", :reply_to => @email) end |