Displaying 5 results from an estimated 5 matches for "property_type".
2006 Mar 08
2
Displaying related tables in forms.. probably an easy question!
Hey All,
I have two tables.. One belongs to another. Why can''t I reference
table1.table2.attribute?
Specifically, using scaffolding:
property.rb -
has_one :PropertyType
property_type.rb -
has_many :Properties
property_controller -
def list
@property_pages, @properties = paginate :properties, :per_page => 10
end
list.html:
1. <% for property in @properties %>
2. <tr>
3. <% for column in Property.content_columns %>
4. <td>
5. &...
2006 Mar 09
0
Re: Displaying related tables in forms.. probably an easy qu
...age-----
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Steve
Koppelman
Sent: Wednesday, March 08, 2006 5:00 PM
To: rails@lists.rubyonrails.org
Subject: [Rails] Re: Displaying related tables in forms.. probably an
easy qu
The fact that you named property_type the way you did with an underscore
makes it especially important that you understand how Rails deals with
names. I''m not 100% sure, but try referencing property.property_type,
with the underscore. Rails will know it as PropertyType and
property_type depending on the context, but not as...
2009 Mar 06
0
How to populate form dropdown with 2nd item of model
I''m trying to create a dropdown list that''s populated from a model but
which has the 2nd item in the model as the default selection. This is
possible.
Here''s the model snippet.
PROPERTY_TYPES = [[''Choose'', ''''],
[''Residential'', ''Residential''],
[''Commercial'', ''Commercial'']]
Here''s the form snippet
<%= f.selec...
2005 Nov 02
4
acts_as_metadata?
...g
myself. Hopefully, this can be released to the community if it works.
Here''s the basic concept as I see it:
CREATE TABLE property(
id int not null primary key auto_increment,
ar_class varchar(255), -- AR class this property extends
property_name varchar(255),
property_type text -- MySQL or Ruby type
);
CREATE TABLE property_value(
id int not null primary key auto_increment,
foreign_id int not null, -- PK of the referenced object
property_id int not null, -- Property
has_many :property_values, PropertyValue belongs_to :property
p...
2006 Jun 04
20
Proposal of some radical changes to API
Hey guys,
Now that the Lucy[1] project has Apache approval and is about to
begin, the onus is no longer on Ferret to strive for Lucene
compatability. (We''ll be doing that in Lucy). So I''m starting to think
about ways to improve Ferret''s API. The first part that needs to be
improved is the Document API. It''s annoying having to type all the
attributes to