On 22 October 2015 at 15:53, byrnejb <[email protected]> wrote:
> I have a custom template file that resides in a non-standard (for RoR)
> location.  I wish to use this template for text format messages generated by
> a stand-alone script.  I also wish to incorporate it into a new RoR app that
> is related to the existing script.  The mailer and templates reside in this
> directory structure:
>
> lib
> ├── hll_action_mailer
> │   ├── hll_action_mailer.rb
> │   ├── hll_th_forex_mailer
> │   │   ├── hll_th_forex_cacb_update_notice.rb
> │   │   ├── hll_th_forex_mailer.rb
> │   │   └── views
> │   │       ├── hll_th_forex_cacb_update_notice.text.erb
> │   │       └── hll_th_forex_commercial_rates_notice.text.erb
>
> I have discovered that passing a do block after the call to the mail method
> discards any template_path and template_name keys passed in the argument
> list. See: https://github.com/rails/rails/pull/18412.  However I cannot seem
> to discover any way at all to use my custom template path and name with a do
> block.

I have not used it, but since no-one else has suggested anything,
perhaps prepend_view_path is an option.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtHgWoDmXVuF21S4_vjz3qwpx8pfH%3DJuG7nvn0Ayk7D2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to