Code that controller and view can access

Is there a way I can make a function be accessible by both the
controller and the view?

On 17 Dec 2007, at 02:24, Mike C wrote:

Is there a way I can make a function be accessible by both the
controller and the view?

class MyController < ActionController::Base

def some_method
end

helper_method :some_method
end

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs