<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Javascript auto include rails plugin</title>
	<atom:link href="http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/</link>
	<description>UK Hosting News &#38; Articles</description>
	<pubDate>Tue, 06 Jan 2009 06:08:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Mark</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-20498</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 07 Aug 2008 09:54:05 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-20498</guid>
		<description>In case somebody likes to use this plugin with the warbler-gem.
I had to change the jsai_path in javascript_auto_include.rb to "#{JAVASCRIPTS_DIR}/views" to make it work with the ruby warbler-gem because the created war-file has a different directory-structure as the standard rails one.</description>
		<content:encoded><![CDATA[<p>In case somebody likes to use this plugin with the warbler-gem.<br />
I had to change the jsai_path in javascript_auto_include.rb to &#8220;#{JAVASCRIPTS_DIR}/views&#8221; to make it work with the ruby warbler-gem because the created war-file has a different directory-structure as the standard rails one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antipode</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-20365</link>
		<dc:creator>antipode</dc:creator>
		<pubDate>Thu, 31 Jul 2008 00:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-20365</guid>
		<description>Awesome idea!  I heard about this a while ago on the Rails Envy podcast.  Now I'm planning to use your plugin in conjunction Dan Webb's LowPro (http://www.danwebb.net/lowpro).  I think that will be a good fit.</description>
		<content:encoded><![CDATA[<p>Awesome idea!  I heard about this a while ago on the Rails Envy podcast.  Now I&#8217;m planning to use your plugin in conjunction Dan Webb&#8217;s LowPro (http://www.danwebb.net/lowpro).  I think that will be a good fit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Media72</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19726</link>
		<dc:creator>Media72</dc:creator>
		<pubDate>Thu, 19 Jun 2008 01:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19726</guid>
		<description>@PICO: Inline javascript is bad and IMO should be avoided at all costs. In fact I can't think of any time I have needed to use inline javascript recently, or any reason why you would need to. This plugin was not designed, and never will include, support for inline javascript.

I would suggest you look at the load events offered by most JS libraries and use this to add functionality to your pages.</description>
		<content:encoded><![CDATA[<p>@PICO: Inline javascript is bad and IMO should be avoided at all costs. In fact I can&#8217;t think of any time I have needed to use inline javascript recently, or any reason why you would need to. This plugin was not designed, and never will include, support for inline javascript.</p>
<p>I would suggest you look at the load events offered by most JS libraries and use this to add functionality to your pages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PICO</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19725</link>
		<dc:creator>PICO</dc:creator>
		<pubDate>Wed, 18 Jun 2008 23:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19725</guid>
		<description>1 problem might be that you need to include some javascript at a certain point in a page, this solution wont help you with that.  I've thought about this exact thing before, and I find that its just easier to have small pieces of javascript just on the view page where they belong.  No big deal.</description>
		<content:encoded><![CDATA[<p>1 problem might be that you need to include some javascript at a certain point in a page, this solution wont help you with that.  I&#8217;ve thought about this exact thing before, and I find that its just easier to have small pieces of javascript just on the view page where they belong.  No big deal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: masone</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19723</link>
		<dc:creator>masone</dc:creator>
		<pubDate>Sat, 14 Jun 2008 15:27:58 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19723</guid>
		<description>Yeah, but I can only render either a JS or a HTML response at once, right? I think with a JS hook in the respond_to block it only will render the js.erb if I explicitly request a JS via the content type header which is not exactly the case with the auto include plugin.

So if I want to render a show.html.erb and a show.js.erb "at once" it won't work or am I wrong?</description>
		<content:encoded><![CDATA[<p>Yeah, but I can only render either a JS or a HTML response at once, right? I think with a JS hook in the respond_to block it only will render the js.erb if I explicitly request a JS via the content type header which is not exactly the case with the auto include plugin.</p>
<p>So if I want to render a show.html.erb and a show.js.erb &#8220;at once&#8221; it won&#8217;t work or am I wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Media72</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19719</link>
		<dc:creator>Media72</dc:creator>
		<pubDate>Sun, 08 Jun 2008 02:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19719</guid>
		<description>@masone: If you are using .js.erb files you can tell the controller which view/.js.erb file to render so there is no need to this plugin in that situation.</description>
		<content:encoded><![CDATA[<p>@masone: If you are using .js.erb files you can tell the controller which view/.js.erb file to render so there is no need to this plugin in that situation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: masone</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19718</link>
		<dc:creator>masone</dc:creator>
		<pubDate>Sat, 07 Jun 2008 08:59:04 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19718</guid>
		<description>It would be great if it worked with .js.erb files too.

Great plugin though. Absolutely what I was always looking for!</description>
		<content:encoded><![CDATA[<p>It would be great if it worked with .js.erb files too.</p>
<p>Great plugin though. Absolutely what I was always looking for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Media72</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19668</link>
		<dc:creator>Media72</dc:creator>
		<pubDate>Thu, 29 May 2008 05:12:16 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19668</guid>
		<description>@Geoff &#038; @ Bogdan: In the case of form partials the auto include only looks at the controller and view names when determining what to load, the plugin is not partial aware. You could either put your code in the controller JS file and have it loaded for all views of that controller, or you could create two files with the same code.

If could be something to include in a future version that will in some way allow the inclusion of a single file in multiple views. Maybe something along the lines of public/javascripts/views/users/new&#124;edit.js could be one way.</description>
		<content:encoded><![CDATA[<p>@Geoff &#038; @ Bogdan: In the case of form partials the auto include only looks at the controller and view names when determining what to load, the plugin is not partial aware. You could either put your code in the controller JS file and have it loaded for all views of that controller, or you could create two files with the same code.</p>
<p>If could be something to include in a future version that will in some way allow the inclusion of a single file in multiple views. Maybe something along the lines of public/javascripts/views/users/new|edit.js could be one way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19624</link>
		<dc:creator>Geoff</dc:creator>
		<pubDate>Tue, 27 May 2008 12:08:14 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19624</guid>
		<description>@Media72: I think Bogdan means he's got some javascript form validation or something of that kind which is intended to be used with his _form that is rendered into his new and edit view templates. So in order to have the javascript appear and work for the form two copies of the validation code would need to exist in both public/javascripts/views/users/{new,edit}.js instead of just once in say _form.js</description>
		<content:encoded><![CDATA[<p>@Media72: I think Bogdan means he&#8217;s got some javascript form validation or something of that kind which is intended to be used with his _form that is rendered into his new and edit view templates. So in order to have the javascript appear and work for the form two copies of the validation code would need to exist in both public/javascripts/views/users/{new,edit}.js instead of just once in say _form.js</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Media72</title>
		<link>http://blog.media72.net/2008/05/13/javascript-auto-include-rails-plugin/#comment-19523</link>
		<dc:creator>Media72</dc:creator>
		<pubDate>Sat, 24 May 2008 08:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://hosting.media72.co.uk/blog/?p=75#comment-19523</guid>
		<description>@weepy: Yes it will work with most types of caching.</description>
		<content:encoded><![CDATA[<p>@weepy: Yes it will work with most types of caching.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
