{"action":"created","issue":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1088","labels_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1088/labels{/name}","comments_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1088/comments","events_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1088/events","html_url":"https://github.com/neo4jrb/neo4j/pull/1088","id":123966146,"number":1088,"title":"Allow same name for property and scope","user":{"login":"cheerfulstoic","id":301415,"avatar_url":"https://avatars.githubusercontent.com/u/301415?v=3","gravatar_id":"","url":"https://api.github.com/users/cheerfulstoic","html_url":"https://github.com/cheerfulstoic","followers_url":"https://api.github.com/users/cheerfulstoic/followers","following_url":"https://api.github.com/users/cheerfulstoic/following{/other_user}","gists_url":"https://api.github.com/users/cheerfulstoic/gists{/gist_id}","starred_url":"https://api.github.com/users/cheerfulstoic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheerfulstoic/subscriptions","organizations_url":"https://api.github.com/users/cheerfulstoic/orgs","repos_url":"https://api.github.com/users/cheerfulstoic/repos","events_url":"https://api.github.com/users/cheerfulstoic/events{/privacy}","received_events_url":"https://api.github.com/users/cheerfulstoic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/neo4jrb/neo4j/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-27T07:34:34Z","updated_at":"2015-12-29T02:10:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/neo4jrb/neo4j/pulls/1088","html_url":"https://github.com/neo4jrb/neo4j/pull/1088","diff_url":"https://github.com/neo4jrb/neo4j/pull/1088.diff","patch_url":"https://github.com/neo4jrb/neo4j/pull/1088.patch"},"body":"Ran across this issue in the GraphGist portal app.  My code:\r\n\r\n```ruby\r\nclass UseCase < GraphStarter::Asset\r\n  property :name, type: String\r\n  property :for_challenge, type: Boolean\r\n\r\n  scope :for_challenge, -> { where(for_challenge: true) }\r\n\r\n  has_many :in, :graph_gists, origin: :use_cases\r\nend\r\n```\r\n\r\nWhenever I would try to use the `UseCase` model (or an association to it), I would get a \"stack level to deep\" message.  Tracked it down and it seems like we're creating an instance method for scopes, though I don't think we ever need an instance method for scopes, so I killed it.\r\n\r\n@subvertallchris seem good?"},"comment":{"url":"https://api.github.com/repos/neo4jrb/neo4j/issues/comments/167699567","html_url":"https://github.com/neo4jrb/neo4j/pull/1088#issuecomment-167699567","issue_url":"https://api.github.com/repos/neo4jrb/neo4j/issues/1088","id":167699567,"user":{"login":"cheerfulstoic","id":301415,"avatar_url":"https://avatars.githubusercontent.com/u/301415?v=3","gravatar_id":"","url":"https://api.github.com/users/cheerfulstoic","html_url":"https://github.com/cheerfulstoic","followers_url":"https://api.github.com/users/cheerfulstoic/followers","following_url":"https://api.github.com/users/cheerfulstoic/following{/other_user}","gists_url":"https://api.github.com/users/cheerfulstoic/gists{/gist_id}","starred_url":"https://api.github.com/users/cheerfulstoic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheerfulstoic/subscriptions","organizations_url":"https://api.github.com/users/cheerfulstoic/orgs","repos_url":"https://api.github.com/users/cheerfulstoic/repos","events_url":"https://api.github.com/users/cheerfulstoic/events{/privacy}","received_events_url":"https://api.github.com/users/cheerfulstoic/received_events","type":"User","site_admin":false},"created_at":"2015-12-29T02:10:32Z","updated_at":"2015-12-29T02:10:32Z","body":"Looks like I refactored the code in 670a35305af68c5239525b3bda02272182d7c8b2 but it's been there since the implementation of scopes my @andreasronge in c14fec230405f78548b122702089f89547711eb5"}}