>From what I found in the source, the compilation with EEx happens in 
`eex_engine` here  
https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/template/eex_engine.ex#L8
,
and the generate functions for each template are defined here 
https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/template.ex#L373-L393.

It doesn't seem to call `EEx.function_from_file`, but the end result is 
pretty much the same.

Em terça-feira, 12 de julho de 2016 14:32:55 UTC-3, OvermindDL1 escreveu:
>
> Oh and yes, the actual EEX compilation happens at:  
> https://github.com/elixir-lang/elixir/blob/v1.3.1/lib/eex/lib/eex.ex#L150
>
> On Tuesday, July 12, 2016 at 11:27:50 AM UTC-6, OvermindDL1 wrote:
>>
>> ```elixir
>> iex(1)> MyServer.IndexView.module_info[:exports]
>> [__info__: 1, __phoenix_recompile__?: 0, __resource__: 0, __templates__: 
>> 0,
>>  breadcrumb: 4, menu: 4, render: 1, render: 2, template_not_found: 2,
>>  module_info: 0, module_info: 1]
>> ```
>>
>> It generated the `render/1/2` and `template_not_found/2` functions.  The 
>> code that does starts at:  
>> https://github.com/phoenixframework/phoenix/blob/master/lib/phoenix/template.ex#L136
>>
>> And you can follow it from there.  :-)
>>
>> On Tuesday, July 12, 2016 at 10:25:42 AM UTC-6, Rich Morin wrote:
>>>
>>> > On Jul 12, 2016, at 06:14, Michał Muskała <[email protected]> wrote: 
>>> > The views are compiled to just being functions in the view module. So 
>>> exactly how you can use other functions from a module in a function 
>>> > in tha module, you can use other functions from the view module in 
>>> templates. 
>>>
>>> I suspect there's an easy way to display one of these compiled 
>>> functions; 
>>> might you know this? 
>>>
>>> -r 
>>>
>>>  -- 
>>> http://www.cfcl.com/rdm           Rich Morin           [email protected] 
>>> http://www.cfcl.com/rdm/resume    San Bruno, CA, USA   +1 650-873-7841 
>>>
>>> Software system design, development, and documentation 
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/eb8785ae-1eb9-4106-b1a0-83bb60d7f456%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to