Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Rails 1.0 methods in application controller vs. helper
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="isamura, post: 4502949"] : Hello, : : did you try to use the "require" functionality and put your methods in to a : file and just require it? : : konstantin You've reminded me to review Module and Mixins. It seems I should use "require" and "include". But I am not sure where to place my new module file so that both ApplicationController and ApplicationHelper classes can "see" it. Is there a modules load PATH I should know about? Regards, ..k : : : >I have several methods that can have potential use in both the : > controller and view. Currently there are two copies of each method, : > one in the controller and the other in the helper. : > : > Does anyone know of another location where these methods can be : > accessed by both? Thereby avoiding the duplication of code. : > : > Thanks, : > : > .k : > : > : : [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Rails 1.0 methods in application controller vs. helper
Top