Displaying 3 results from an estimated 3 matches for "association_opt".
2006 Jun 16
0
Getting error on a group select
...tion.new("Dr. Mike", "Michael Carney")
co = AssocType.new("COMPANIES")
co << Assoc.Option.new("Sidekick Design", "Sidekick Design")
co << Assoc.Option.new("Strategic Web Concepts", "Strategic Web
Concepts")
ASSOCIATION_OPTIONS = [ none, dr, co ]
end
My View looks like this:
<select name="user[associationl]" id="user_association">
<%=
option_groups_from_collection_for_select(ASSOCIATION_OPTIONS,
:options, :type_name,
:code_name, :display_name,
@u...
2006 Jun 16
0
Getting an error on options_groups_from_collection_for_select
...nes")
dr << AssocOption.new("Dr. Mike", "Michael Smith-Jones")
co = AssocType.new("COMPANIES")
co << Assoc.Option.new("Company_1", "Company_1")
co << Assoc.Option.new("Company_2", "Company_2")
ASSOCIATION_OPTIONS = [ none, dr, co ]
end
My View looks like this:
<select name="user[associationl]" id="user_association">
<%=
option_groups_from_collection_for_select(ASSOCIATION_OPTIONS,
:options, :type_name,
:code_name, :display_name,
@user.association)
%>
</select>...
2009 Jan 21
3
Nested serialization with to_json and to_xml with array and hash element
Title: Nested serialization with to_json and to_xml with array and
hash element
class Person < ActiveRecord::Base
has_one :address
has_one :job
def office()
return "Executive_Suite"
end
end
class Address < ActiveRecord::Base
belongs_to :person
end
class Job < ActiveRecord::Base
belongs_to :person
has_one :paygrade
def Title
return "Engineer"
end
end