Can not create field named y
Reported by daniel.kwiecinski (at gmail) | May 19th, 2010 @ 11:38 AM
./script/generate hobo_model_resource point y:integer
./script/generate hobo_migration
cat db/migrate/20100519102246_hobo_migration_1.rb
class HoboMigration1 < ActiveRecord::Migration
def self.up
create_table :points do |t|
t.datetime :created_at
t.datetime :updated_at
end
end
def self.down
drop_table :points
end
end
Where is my :y field?
-- Cheers Daniel
Comments and changes to this ticket
-
daniel.kwiecinski (at gmail) May 19th, 2010 @ 11:39 AM
- Title changed from Can not field named y to Can not create field named y
-
Bryan Larsen May 19th, 2010 @ 02:50 PM
This can be fixed with:
--- a/hobosupport/lib/hobo_support/blankslate.rb +++ b/hobosupport/lib/hobo_support/blankslate.rb @@ -1,7 +1,7 @@ # Define BlankSlate in case ActiveSupport aint present unless defined? BlankSlate class BlankSlate - instance_methods.reject { |m| m =~ /^__/ || m.to_s == 'object_id' }.each { |m| undef_method m } + (instance_methods+protected_instance_methods+private_instance_methods).reject { |m| m =~ /^__/ || m.to_s == 'object_id' }.each { |m| undef_method m } def initialize(me) @me = me end
Matt or Tom, do you have any comments?
-
Matt Jones May 25th, 2010 @ 07:49 PM
Do we actually need this anymore? BlankSlate is actually from Builder, and that's (I believe) required for even basic tools like Rake to run. Alternatively, we should (long-term) switch over to BasicObject, which is provided by ActiveSupport on Ruby 1.8 but built-in on 1.9.
-
Tom Locke May 26th, 2010 @ 03:55 PM
- State changed from new to open
I agree we should switch over to BasicObject. In the meantime, if we don't need BlankSlate let's drop it!
-
Bryan Larsen May 26th, 2010 @ 04:06 PM
The only consequence is that we won't want to backport this fix to 1-0-stable. I think that's acceptable.
-
Bryan Larsen June 14th, 2010 @ 03:48 PM
- State changed from open to resolved
(from [8f6fffb9440f6eea40fc735ff33a41ecf7f4870d]) [#724 state:resolved] remove private methods from BlankSlate http://github.com/tablatom/hobo/commit/8f6fffb9440f6eea40fc735ff33a...
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 ยป
People watching this ticket
Referenced by
- 724 Can not create field named y (from [8f6fffb9440f6eea40fc735ff33a41ecf7f4870d]) [#724 s...