# Rails 3 helper method not called

**URL:** <https://www.ruby-forum.com/t/rails-3-helper-method-not-called/194820>\
**Category:** Rails\
**Created:** [September 11, 2010, 1:13pm UTC](https://www.ruby-forum.com/t/rails-3-helper-method-not-called/194820 "2010-09-11T13:13:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bosko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b77776/32.png) [@bosko](https://www.ruby-forum.com/u/bosko)\
**Post date:** [September 11, 2010, 1:13pm UTC](https://www.ruby-forum.com/t/rails-3-helper-method-not-called/194820/1 "2010-09-11T13:13:52Z")

</div>

While I was trying to port one application from Rail 2 to Rails 3 I’ve  
noticed that helper methods used for rewriting URL paths are not  
called. Methods are defined in app/helpers/url\_helper.rb:

module UrlHelper  
def story\_pah(story)  
“/story/#{story.title}”  
end  
end

This method, when called inside of view instead of:

story/1

creates path

story/story\_title.

I order to double check this I’ve create two new applications. One in  
Rails 2 and the other in Rails 3. After that I created scaffold for  
Story:

Rails 2: script/generate scaffold Story title:string body:string  
Rails 3: rails g scaffold Story title:string body:string

Finally I created app/helpers/url\_helper.rb with above method in both  
applications. In app/views/stories/index.html.erb file line:

\<%= link\_to 'Show', story %\>

creates: story/story\_title in Rails 2 and story/1 path in Rails 3.  
Obviously method story\_path is not called in Rails 3. Any hint why  
this happens would be appreciated.

Regards,  
BoÅ¡ko IvaniÅ¡eviÄ‡
