I defined a method ( def scan )into application, I want to use this method in views. but when I used, there is a error: undefined method `scan' for #<ActionView::Base:0x4d91e40>
So who can help me? Thanks!
I defined a method ( def scan )into application, I want to use this method in views. but when I used, there is a error: undefined method `scan' for #<ActionView::Base:0x4d91e40>
So who can help me? Thanks!
I defined a method ( def scan )into application, I want to use this method in views. but when I used, there is a error: undefined method `scan' for #<ActionView::Base:0x4d91e40>
If it's a helper method you could put it into app/helpers/application_helper.rb and it would then be available to your views...
-philip