sebb wrote on 2019-6-2 7:30PM EDT:
> On Mon, 3 Jun 2019 at 00:08, <curc...@apache.org> wrote:
>>
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> curcuru pushed a commit to branch mail_ldap_notification
>> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>>
>> commit 5e74b3aac094e105af73c3c49ec09f49e33d9e31
>> Author: Shane Curcuru <a...@shanecurcuru.org>
>> AuthorDate: Sun Jun 2 19:08:05 2019 -0400
>>
>>     Encapsulate sending mail from roster tool
>>
>>     In progress; currently gives "ReferenceError: Can't find variable: 
>> __FILE__"
> 
> I think that is because the file is converted to Javascript (*.js.rb)
> __FILE__ is a Ruby construct.
> 
> Is it intended that Javascript should send the email directly from the
> browser client?

It's simply encapsulating the same duplicated code in various
roster/views/actions/*.json.rb files, like appgroup/committee/etc.
While they each process the to/cc and such differently, the core
mail.new.... deliver etc. code is the same, and it felt useful to put
them all in the same place.

I also hope to use ERB templates for the mail bodies, so it's easier to
maintain, and add an X-mailer header.

But obviously I'm not understanding some of the limitations the ruby2js
steps put on the code (like not being able to def func(keyword: arg) )
yet.

-- 

- Shane
  Whimsy PMC
  The Apache Software Foundation

Reply via email to