OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename model name
[pettanr/pettanr.git]
/
lib
/
local_manifest
/
profiler
/
association
/
has_many.rb
diff --git
a/lib/local_manifest/profiler/association/has_many.rb
b/lib/local_manifest/profiler/association/has_many.rb
index
2a23989
..
ed971a4
100644
(file)
--- a/
lib/local_manifest/profiler/association/has_many.rb
+++ b/
lib/local_manifest/profiler/association/has_many.rb
@@
-2,7
+2,7
@@
module LocalManifest
module ProfilerModule
module AssociationModule
class HasMany < ManifestBase::Names
module ProfilerModule
module AssociationModule
class HasMany < ManifestBase::Names
- attr :
model_name, :list_name, :table
_name
+ attr :
controller_name, :item_name, :action
_name
def set_default
super
def set_default
super
@@
-11,26
+11,22
@@
module LocalManifest
def init
super
if list_manifest = self.profiler.lists[@name]
def init
super
if list_manifest = self.profiler.lists[@name]
- @
model_name = list_manifest.model
_name
- @
list_name = list_manifest.list
_name
+ @
controller_name = list_manifest.controller
_name
+ @
action_name = list_manifest.action
_name
else
n = @name.split '.'
if n.size > 1
else
n = @name.split '.'
if n.size > 1
- @table_name = n[0]
- @model_name = @table_name.singularize
- @list_name = n[1]
+ @controller_name = n[0]
+ @action_name = n[1]
else
ManifestBase::alert_undefined_message 'list', self.module_message
end
end
end
else
ManifestBase::alert_undefined_message 'list', self.module_message
end
end
end
- def list
- Locmare::ListGroup.list @model_name, @list_name
- end
-
def model
def model
- ::Manifest::item_name_to_model @model_name
+ item_name = Manifest.manifest.controllers[@controller_name].actions[@action_name].item_name
+ ::Manifest::item_name_to_model item_name
end
def association_name
end
def association_name