Field named 'type' doesn't show up
Reported by bronson | January 3rd, 2009 @ 12:04 AM | in Beyond Hobo 1.0
If I create an enum_string named "type", Hobo refuses to display it.
The attached hobo projects demonstrate the problem.
cd test-zetype, script/server, and browse to http://localhost:3000/shows/new . Notice how the "zetype" field shows up and is editable.
Now launch test-type and go to the same URL. "type" does not show up.
The apps are basically identical except for the name of the field.
Comments and changes to this ticket
-
bronson January 3rd, 2009 @ 12:24 AM
Apparently 'type' doesn't make it into the field lists for Show's form and show-page tags. Adding it manually doesn't appear to fix the problem (this is just a quick & dirty attempt though, I might be missing something obvious).
In application.dryml:
<extend tag="form" for="Show"> <old-form> <field-list fields="type"/> </old-form> </extend> <extend tag="show-page" for="Show"> <old-show-page> <field-list fields="type"/> </old-show-page> </extend>
-
Tom Locke January 6th, 2009 @ 04:49 PM
- State changed from new to investigating
I'm not sure if this is allowed, as 'type' is defined on Object in Ruby (although deprecated).
Anyway, will investigate
-
bronson January 6th, 2009 @ 05:02 PM
It appears that Object's type method isn't a showstopper but the STI column name might be: http://www.ruby-forum.com/topic/... Either way, unless things have changed since that ancient forum post, this is probably more a Rails problem than a Hobo problem.
I wonder how many legacy databases have a column named "type"? All of them? :)
-
Bryan Larsen February 27th, 2009 @ 01:40 PM
Can you not just add:
set_inheritance_column "not_sti"
This will fix the problem in Rails. Dunno about hobo.
-
Tom Locke March 13th, 2009 @ 02:32 PM
- Milestone set to Beyond Hobo 1.0
- State changed from investigating to open
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป