<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
	>
<channel>
	<title>Comments on: Ruby on Rails: Accessing Controller Methods from Your View</title>
	<atom:link href="http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/feed/" rel="self" type="application/rss+xml" />
	<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/</link>
	<description>Writing Code is the Easy Part</description>
	<lastBuildDate>Tue, 24 Apr 2012 15:49:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Karan Nanda</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1349</link>
		<dc:creator>Karan Nanda</dc:creator>
		<pubDate>Thu, 19 Apr 2012 06:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1349</guid>
		<description> Use controller instead of @controller. </description>
		<content:encoded><![CDATA[<p> Use controller instead of @controller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karan Nanda</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1333</link>
		<dc:creator>Karan Nanda</dc:creator>
		<pubDate>Thu, 12 Apr 2012 07:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1333</guid>
		<description>
Use controller instead of @controller. </description>
		<content:encoded><![CDATA[<p>Use controller instead of @controller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Max Wood</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1320</link>
		<dc:creator>Charles Max Wood</dc:creator>
		<pubDate>Wed, 14 Mar 2012 01:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1320</guid>
		<description>If you&#039;re trying to share functionality between controllers, I&#039;d look at what I&#039;m doing and make sure it&#039;s not a model&#039;s job to do that thing.

You can also add the method to ApplicationController. Then it&#039;s available to all of your controllers.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re trying to share functionality between controllers, I&#8217;d look at what I&#8217;m doing and make sure it&#8217;s not a model&#8217;s job to do that thing.</p>
<p>You can also add the method to ApplicationController. Then it&#8217;s available to all of your controllers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amer Zec</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1319</link>
		<dc:creator>Amer Zec</dc:creator>
		<pubDate>Tue, 13 Mar 2012 21:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1319</guid>
		<description>I got the same thing, this is the error: undefined method `highlight_header&#039; for nil:NilClass</description>
		<content:encoded><![CDATA[<p>I got the same thing, this is the error: undefined method `highlight_header&#8217; for nil:NilClass</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taimoor Changaiz</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1314</link>
		<dc:creator>Taimoor Changaiz</dc:creator>
		<pubDate>Fri, 09 Mar 2012 08:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1314</guid>
		<description>i want to call other controller method but em on other controller and i want to set format type like js format on calling method


To be specific for example

Suppose I&#039;m on  A controller

I want to call B controller method with format.js request type how is it possible :)</description>
		<content:encoded><![CDATA[<p>i want to call other controller method but em on other controller and i want to set format type like js format on calling method</p>
<p>To be specific for example</p>
<p>Suppose I&#8217;m on  A controller</p>
<p>I want to call B controller method with format.js request type how is it possible <img src='http://teachmetocode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1221</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 23 Nov 2011 01:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1221</guid>
		<description>3.1.2 I think.  Fresh install on Saturday so whatever the latest version is.  Don&#039;t have my laptop to check at the moment.</description>
		<content:encoded><![CDATA[<p>3.1.2 I think.  Fresh install on Saturday so whatever the latest version is.  Don&#8217;t have my laptop to check at the moment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Max Wood</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1220</link>
		<dc:creator>Charles Max Wood</dc:creator>
		<pubDate>Wed, 23 Nov 2011 00:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1220</guid>
		<description>What version of Rails are you using? I believe this was in Rails 2.3.x. May not work in Rails 3.x.</description>
		<content:encoded><![CDATA[<p>What version of Rails are you using? I believe this was in Rails 2.3.x. May not work in Rails 3.x.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1219</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 23 Nov 2011 00:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1219</guid>
		<description>I can&#039;t seem to get this to work?  I have a controller with 2 methods.  In the view corresponding to one of these methods I call &quot;@controller.some_method&quot;.  However, I get an NoMethodError.  &quot;undefined method &#039;some_method&#039; for nilClass...............</description>
		<content:encoded><![CDATA[<p>I can&#8217;t seem to get this to work?  I have a controller with 2 methods.  In the view corresponding to one of these methods I call &#8220;@controller.some_method&#8221;.  However, I get an NoMethodError.  &#8221;undefined method &#8216;some_method&#8217; for nilClass&#8230;&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Undenfined local variable or method when the view call a method - Programmers Goodies</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-1128</link>
		<dc:creator>Undenfined local variable or method when the view call a method - Programmers Goodies</dc:creator>
		<pubDate>Fri, 12 Aug 2011 06:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-1128</guid>
		<description>[...] This article may help you : Ruby on Rails: Accessing Controller Methods from Your View [...]</description>
		<content:encoded><![CDATA[<p>[...] This article may help you : Ruby on Rails: Accessing Controller Methods from Your View [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-523</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 14 Jun 2010 11:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-523</guid>
		<description>but if you put into helper, you can&#039;t access to request object.</description>
		<content:encoded><![CDATA[<p>but if you put into helper, you can&#8217;t access to request object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-522</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 27 Jan 2010 09:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-522</guid>
		<description>Leon has clearly got the cleanest solution.
All your helper methods are available in your views already, but if you need to declare some methods in the controller as helper_methods, this works beautifully.</description>
		<content:encoded><![CDATA[<p>Leon has clearly got the cleanest solution.<br />
All your helper methods are available in your views already, but if you need to declare some methods in the controller as helper_methods, this works beautifully.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ennuyer.net &#187; Blog Archive &#187; Rails Reading backlog</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-521</link>
		<dc:creator>Ennuyer.net &#187; Blog Archive &#187; Rails Reading backlog</dc:creator>
		<pubDate>Sat, 11 Jul 2009 09:20:27 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-521</guid>
		<description>[...]  Ruby on Rails: Accessing Controller Methods from Your View  [...] </description>
		<content:encoded><![CDATA[<p>[...]  Ruby on Rails: Accessing Controller Methods from Your View  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leon</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-520</link>
		<dc:creator>Leon</dc:creator>
		<pubDate>Sat, 11 Jul 2009 00:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-520</guid>
		<description>Can you just do this?

helper_method :public_method_name

This makes your controller method a helper method as well.</description>
		<content:encoded><![CDATA[<p>Can you just do this?</p>
<p>helper_method :public_method_name</p>
<p>This makes your controller method a helper method as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Weiskotten</title>
		<link>http://teachmetocode.com/articles/ruby-on-rails-accessing-controller-methods-from-your-view/#comment-519</link>
		<dc:creator>Jeremy Weiskotten</dc:creator>
		<pubDate>Fri, 10 Jul 2009 21:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://charlesmaxwood.com/?p=296#comment-519</guid>
		<description>A better way, IMO, is to call #helper_method in your controller to declare any methods as &quot;helpers&quot; for use in views:

helper_method :my_helper</description>
		<content:encoded><![CDATA[<p>A better way, IMO, is to call #helper_method in your controller to declare any methods as &#8220;helpers&#8221; for use in views:</p>
<p>helper_method :my_helper</p>
]]></content:encoded>
	</item>
</channel>
</rss>

