<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>source.mihelac.org - Override helpers in Rails Comments</title>
  <id>tag:source.mihelac.org,2008:/2007/2/28/override-helpers-in-rails/comments</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
  <updated>2007-12-11T02:28:55Z</updated>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>clorinda</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:765</id>
    <published>2007-12-11T02:28:55Z</published>
    <updated>2007-12-11T02:28:55Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by clorinda</title>
<content type="html">&lt;p&gt;You can&#8217;t always have cash to pay for things you need to obtain immediately. For such occasions banks offer credit cards which differ in purpose and features like interest rates, rewards, fees. But you need to build good credit history to be able to use all the opportunities credit cards give. At&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http:&quot; /&gt;o percent interest discover card&lt;/a&gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>dee</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:763</id>
    <published>2007-12-10T23:10:52Z</published>
    <updated>2007-12-10T23:10:52Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by dee</title>
<content type="html">&lt;p&gt;I&#8217;m a newly wed and we together with my spouse decided to start building good credit as we started a family of our own, as in future we&#8217;ll have buy a house and cars and many other things. I wanted a credit card for both of us, so that we could use it together and accumulate credit rating. Happily, I found a card for spouses at&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http:&quot; /&gt;barclays bank balance transfers with 12 months interest free with no credit fee charge&lt;/a&gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>Bojan Mihelac</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:117</id>
    <published>2007-04-22T05:03:05Z</published>
    <updated>2007-04-22T05:03:05Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by Bojan Mihelac</title>
<content type="html">techno weenie explains both &quot;Rails initialization process&quot;:http://weblog.techno-weenie.net/2007/1/24/understanding-the-rails-initialization-process and &quot;Rails Plugin initialization process&quot;:http://weblog.techno-weenie.net/2007/1/26/understanding-the-rails-plugin-initialization-process.  Very useful to know how it works if you need to extend Rails or write plugins.</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>Stan</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:116</id>
    <published>2007-04-22T02:47:13Z</published>
    <updated>2007-04-22T02:47:13Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by Stan</title>
<content type="html">Thanks a lot, Bojan. I have almost same situation, except i want to redefine private method:
ActionView::Helpers::InstanceTag.add_options
The problem is that i wrongly put path before (ActionView::Helpers::FormOptionsHelper::InstanceTag).
So i had code almost identical to yours and wondered why it didn't work (i put it initially directly to environment.rb).
P.S. To avoid such errors further do u know how to calculate way to certain method, not digging through source code?
Thanks.</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>Bojan Mihelac</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:115</id>
    <published>2007-04-21T12:21:29Z</published>
    <updated>2007-04-21T12:21:29Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by Bojan Mihelac</title>
<content type="html">Stan,
put code in +lib+ folder and include it in +config/environment.rb+. It would not be good idea to change core rails files as it wouldn't be easy to upgrade.</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>Stan</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:114</id>
    <published>2007-04-21T11:02:30Z</published>
    <updated>2007-04-21T11:02:30Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by Stan</title>
<content type="html">And where place this code, so rails can pickup it? For example i don't want to freeze rails and change core files?</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>cptvitamin</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:113</id>
    <published>2007-03-14T11:39:27Z</published>
    <updated>2007-03-14T11:39:27Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by cptvitamin</title>
<content type="html">Great tutorial, for noobs, you might want to mention that you have to freeze rails if you are hosting on a shared server (then make the changes in /vendor/rails).
Also, any changes made to the frozen rails requires a restart of WEBrick for the changes to take effect.</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>Bojan Mihelac</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:112</id>
    <published>2007-03-07T15:17:37Z</published>
    <updated>2007-03-07T15:17:37Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by Bojan Mihelac</title>
<content type="html">Jeff, sure I started with that, but I liked idea to use _standard_ helpers early in development and customize after without search/replace all over.

It's maybe unjustified to write so much code for this simple example, but I wanted to show method how to replace helpers and how mixed methods behave in class.</content>  </entry>
  <entry xml:base="http://source.mihelac.org/">
    <author>
      <name>Jeff</name>
    </author>
    <id>tag:source.mihelac.org,2007-02-28:32:111</id>
    <published>2007-03-07T13:47:32Z</published>
    <updated>2007-03-07T13:47:32Z</updated>
    <link href="http://source.mihelac.org/2007/2/28/override-helpers-in-rails" rel="alternate" type="text/html"/>
    <title>Comment on 'Override helpers in Rails' by Jeff</title>
<content type="html">I'm sure you thought of this, but perhaps you could have just provided your own helper as a wrapper?
 
    def number_to_euro(amount)
      number_to_currency(amount, :unit =&gt; ' &amp;euro')
    end

Of course, then you'd have to tell everyone else on your team to use this new helper, which might not be ideal.</content>  </entry>
</feed>
