Skip to content

Commit

Permalink
Some (probably) unnecessary code in associations is commented out
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Apr 29, 2008
1 parent f57e90e commit f58c76c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lib/strokedb/document/associations.rb
Expand Up @@ -81,12 +81,15 @@ def has_many(slotname, opts={}, &block)
raise "has_many extension should be either Module or Proc"
end
reference_slotname = reference_slotname || name.demodulize.tableize.singularize
if name.index('::') # we're in namespaced meta
_t = name.split('::')
_t.pop
_t << meta
meta = _t.join('::')
end

# TODO: remove the below commented out code, it seems that we do not need it anymore
# (but I am not sure, so that's why I've left it here)
# if name.index('::') # we're in namespaced meta
# _t = name.split('::')
# _t.pop
# _t << meta
# meta = _t.join('::')
# end


view = View.define!({ :reference_slotname => reference_slotname, :through => through, :expected_meta => meta, :extend_with => extend_with }.to_json,
Expand Down

0 comments on commit f58c76c

Please sign in to comment.