OrderNotifier.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <!DOCTYPE html>
  2. <!--
  3. ! Excerpted from "Agile Web Development with Rails",
  4. ! published by The Pragmatic Bookshelf.
  5. ! Copyrights apply to this code. It may not be used to create training material,
  6. ! courses, books, articles, and the like. Contact us if you are in doubt.
  7. ! We make no guarantees that this code is fit for any purpose.
  8. ! Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  9. -->
  10. <html>
  11. <head>
  12. <meta charset="utf-8">
  13. <title>class OrderNotifier - Rails Application Documentation</title>
  14. <link href="./fonts.css" rel="stylesheet">
  15. <link href="./rdoc.css" rel="stylesheet">
  16. <script type="text/javascript">
  17. var rdoc_rel_prefix = "./";
  18. </script>
  19. <script src="./js/jquery.js"></script>
  20. <script src="./js/navigation.js"></script>
  21. <script src="./js/search_index.js"></script>
  22. <script src="./js/search.js"></script>
  23. <script src="./js/searcher.js"></script>
  24. <script src="./js/darkfish.js"></script>
  25. <body id="top" role="document" class="class">
  26. <nav role="navigation">
  27. <div id="project-navigation">
  28. <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  29. <h2>
  30. <a href="./index.html" rel="home">Home</a>
  31. </h2>
  32. <div id="table-of-contents-navigation">
  33. <a href="./table_of_contents.html#pages">Pages</a>
  34. <a href="./table_of_contents.html#classes">Classes</a>
  35. <a href="./table_of_contents.html#methods">Methods</a>
  36. </div>
  37. </div>
  38. <div id="search-section" role="search" class="project-section initially-hidden">
  39. <form action="#" method="get" accept-charset="utf-8">
  40. <div id="search-field-wrapper">
  41. <input id="search-field" role="combobox" aria-label="Search"
  42. aria-autocomplete="list" aria-controls="search-results"
  43. type="text" name="search" placeholder="Search" spellcheck="false"
  44. title="Type to search, Up and Down to navigate, Enter to load">
  45. </div>
  46. <ul id="search-results" aria-label="Search Results"
  47. aria-busy="false" aria-expanded="false"
  48. aria-atomic="false" class="initially-hidden"></ul>
  49. </form>
  50. </div>
  51. </div>
  52. <div id="class-metadata">
  53. <div id="parent-class-section" class="nav-section">
  54. <h3>Parent</h3>
  55. <p class="link">ActionMailer::Base
  56. </div>
  57. <!-- Method Quickref -->
  58. <div id="method-list-section" class="nav-section">
  59. <h3>Methods</h3>
  60. <ul class="link-list" role="directory">
  61. <li ><a href="#method-i-received">#received</a>
  62. <li ><a href="#method-i-shipped">#shipped</a>
  63. </ul>
  64. </div>
  65. </div>
  66. </nav>
  67. <main role="main" aria-labelledby="class-OrderNotifier">
  68. <h1 id="class-OrderNotifier" class="class">
  69. class OrderNotifier
  70. </h1>
  71. <section class="description">
  72. </section>
  73. <section id="5Buntitled-5D" class="documentation-section">
  74. <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
  75. <header>
  76. <h3>Public Instance Methods</h3>
  77. </header>
  78. <div id="method-i-received" class="method-detail ">
  79. <div class="method-heading">
  80. <span class="method-name">received</span><span
  81. class="method-args">(order)</span>
  82. <span class="method-click-advice">click to toggle source</span>
  83. </div>
  84. <div class="method-description">
  85. <pre>Subject can be set in your I18n file at config/locales/en.yml
  86. with the following lookup:
  87. en.order_notifier.received.subject</pre>
  88. <p>START:received</p>
  89. <div class="method-source-code" id="received-source">
  90. <pre><span class="ruby-comment"># File app/mailers/order_notifier.rb, line 10</span>
  91. <span class="ruby-keyword">def</span> <span class="ruby-identifier">received</span>(<span class="ruby-identifier">order</span>)
  92. <span class="ruby-ivar">@order</span> = <span class="ruby-identifier">order</span>
  93. <span class="ruby-identifier">mail</span> <span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">order</span>.<span class="ruby-identifier">email</span>, <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;Pragmatic Store Order Confirmation&#39;</span>
  94. <span class="ruby-keyword">end</span></pre>
  95. </div>
  96. </div>
  97. </div>
  98. <div id="method-i-shipped" class="method-detail ">
  99. <div class="method-heading">
  100. <span class="method-name">shipped</span><span
  101. class="method-args">(order)</span>
  102. <span class="method-click-advice">click to toggle source</span>
  103. </div>
  104. <div class="method-description">
  105. <pre>Subject can be set in your I18n file at config/locales/en.yml
  106. with the following lookup:
  107. en.order_notifier.shipped.subject</pre>
  108. <p>START:shipped</p>
  109. <div class="method-source-code" id="shipped-source">
  110. <pre><span class="ruby-comment"># File app/mailers/order_notifier.rb, line 23</span>
  111. <span class="ruby-keyword">def</span> <span class="ruby-identifier">shipped</span>(<span class="ruby-identifier">order</span>)
  112. <span class="ruby-ivar">@order</span> = <span class="ruby-identifier">order</span>
  113. <span class="ruby-identifier">mail</span> <span class="ruby-identifier">to</span><span class="ruby-operator">:</span> <span class="ruby-identifier">order</span>.<span class="ruby-identifier">email</span>, <span class="ruby-identifier">subject</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;Pragmatic Store Order Shipped&#39;</span>
  114. <span class="ruby-keyword">end</span></pre>
  115. </div>
  116. </div>
  117. </div>
  118. </section>
  119. </section>
  120. </main>
  121. <footer id="validator-badges" role="contentinfo">
  122. <p><a href="http://validator.w3.org/check/referer">Validate</a>
  123. <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
  124. <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
  125. </footer>