CITIEsForRAILS 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{CITIEsForRAILS}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Laurent Buffat & Pierre-Emmanuel JOUVE"]
9
- s.date = %q{2011-02-15}
9
+ s.date = %q{2011-02-16}
10
10
  s.description = %q{CITIEsForRAILS (Class Inheritance & Table Iheritance Embeddings For RAILS) is a solution that extends Single/Multiple/Class Table Inheritance. This solution is based on classical Ruby class inheritance, single table inheritance as well as DB views.
11
11
 
12
12
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('CITIEsForRAILS', '0.0.3') do |p|
5
+ Echoe.new('CITIEsForRAILS', '0.0.4') do |p|
6
6
  p.description = "CITIEsForRAILS (Class Inheritance & Table Iheritance Embeddings For RAILS) is a solution that extends Single/Multiple/Class Table Inheritance. This solution is based on classical Ruby class inheritance, single table inheritance as well as DB views.
7
7
 
8
8
 
@@ -20,7 +20,9 @@ module Cities
20
20
 
21
21
 
22
22
  db_type_field = (options[:db_type_field] || :type).to_s #:db_type_field = option for setting the inheritance columns, default value = 'type'
23
+ puts "tablename option->#{:table_name}"
23
24
  table_name = (options[:table_name] || self.name.tableize.gsub(/\//,'_')).to_s #:table_name = option for setting the name of the current class table_name, default value = 'tableized(current class name)'
25
+ puts "tablename now->#{table_name}"
24
26
 
25
27
  set_inheritance_column "#{db_type_field}"
26
28
 
@@ -33,6 +35,7 @@ module Cities
33
35
  puts "acts_as_cities -> NON mother class"
34
36
 
35
37
  set_table_name "view_#{table_name}"
38
+ puts "tablename->#{self.table_name}"
36
39
  aaa=create_class_part_of self# these 2 lines are there for the creation of class PartOf (which is a class of the current class)
37
40
  self.const_set("PartOf",aaa) # it will stand for the write table of the current class
38
41
 
@@ -82,7 +85,10 @@ module Cities
82
85
  if RAILS_ENV == 'development'
83
86
  puts "acts_as_cities -> MOTHER class"
84
87
  end
85
- set_table_name="#{table_name}"
88
+ puts("now table_name->#{table_name}")
89
+ set_table_name "#{table_name}"
90
+ puts "tablename->#{self.table_name}"
91
+ #table_name = (options[:table_name] || self.name.tableize.gsub(/\//,'_')).to_s #:table_name = option for setting the name of the current class table_name, default value = 'tableized(current class name)'
86
92
 
87
93
  def self.mother_class #returns the mother class (the highest inherited class before ActiveRecord)
88
94
  if(self.superclass!=ActiveRecord::Base)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Laurent Buffat & Pierre-Emmanuel JOUVE
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-02-15 00:00:00 +01:00
17
+ date: 2011-02-16 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies: []
20
20