[katello-devel] Javascript View Includes

Jason Rist jrist at redhat.com
Mon Jul 11 18:07:02 UTC 2011


On 07/11/2011 08:23 AM, Ohad Levy wrote:
> On Mon, 2011-07-11 at 07:58 -0600, Jason Rist wrote:
>> On 07/11/2011 07:11 AM, Eric Helms wrote:
>>> I have attempted to streamline javascript includes so that they are all
>>> placed in the html head and not inline.  If you need to include
>>> javascript in a view template, you can place the javascript calls inside
>>> a "- content_for :javascripts do" block. For Example,
>>>
>>> - content_for :javascripts do
>>>   = include_javascripts :env_select
>>>
>>>   :javascript
>>>     var foo = "bar";
>>>
>>>
>>> Eric Helms
>>> ehelms at redhat.com
>>>
>>> _______________________________________________
>>> katello-devel mailing list
>>> katello-devel at redhat.com
>>> https://www.redhat.com/mailman/listinfo/katello-devel
>> Erm... what does this do? Force it into the head of the rendered haml?
> 
> Yeah.
> 
> FYI, its easy to make helpers for this stuff, such as:
> https://github.com/ohadlevy/foreman/blob/develop/app/helpers/layout_helper.rb
> 
> Ohad
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel
Eric - sounds like something we should look into?

-J

-- 
Jason E. Rist
Senior Software Engineer
Systems Management and Cloud Enablement
Red Hat, Inc.
+1.919.754.4048
Freenode: jrist




More information about the katello-devel mailing list