Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity classe nested inside the module results in invalid method name being generated #13

Open
uds opened this issue Mar 31, 2011 · 0 comments

Comments

@uds
Copy link

uds commented Mar 31, 2011

when I try to persist an instance of the entity class defined inside the module, I'm getting following exception:

c:/Ruby/Ruby-1.9.2/lib/ruby/gems/1.9.1/gems/couch_potato-0.4.0/lib/couch_potato/view/custom_views.rb:34:in `instance_eval': (eval):1: syntax error, unexpected '/', expecting ';' or '\n' (SyntaxError)
def association_th_shop/product_belongs_to_supplier(v...
                        ^
(eval):1: syntax error, unexpected keyword_end, expecting $end
...upplier", view_parameters); end
...                               ^
    from c:/Ruby/Ruby-1.9.2/lib/ruby/gems/1.9.1/gems/couch_potato-0.4.0/lib/couch_potato/view/custom_views.rb:34:in `view'
    from c:/Ruby/Ruby-1.9.2/lib/ruby/gems/1.9.1/gems/simply_stored-0.5.3/lib/simply_stored/couch/belongs_to.rb:24:in `belongs_to'
...

here is my entity class:

module ThShop
  class Product
    include SimplyStored::Couch

    belongs_to :supplier
  end
end 

apparently, the problem is in the slash character inserted into the method name.

I'm using simply_stored 0.5.3 with Ruby 1.9.2-p180 on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant