Displaying 1 result from an estimated 1 matches for "programopt".
Did you mean:
programnet
2006 Jan 23
3
problem with a selfmade helper method
...one?
-snip- from index.rhtml
<%=
option_groups_from_collection_for_select(
grouped_programs_selector(:programs, :programtypes), # calling
application_helper - method.
:options, :type_name,
:id, :name,
@programs)
%>
-snap- application_helper.rb
module ApplicationHelper
class ProgramOption
attr_reader :attributes
@attributes = []
def initialize(id, name)
@attributes = Struct.new(@id, @name)
end
end
class ProgramType
attr_reader :type_name, :options
def initialize(name)
@type_name=name
@opt...