Skip to content

Neo4j.rb v3 Tips and Related Gems

Brian Underwood edited this page Apr 27, 2015 · 8 revisions

Preventing Cypher Injection

Always use params with queries to protect yourself from Cypher injection. It also allows the server to cache execution paths, which will lead to better performance.

Student.lessons(:l, :r).where("r.grade > '{grade}'").params(grade: 89)

Using a hash in a where method will automatically generate a parameterized query. Be careful with strings as illustrated above!

Rails Example

Blogs

Screen Casts

Neo4j with devise

See /~https://github.com/benjackson/devise-neo4j and use the 2.0.0.alpha.X versions for support with Neo4jrb 3.0. See example application: /~https://github.com/andreasronge/rails-devise

neo4j-will_paginate_redux

See /~https://github.com/neo4jrb/neo4j-will_paginate_redux

neo4jrb-paperclip

Leo Lou's original gem updated for Neo4j.rb 3.0. See /~https://github.com/neo4jrb/neo4jrb-paperclip

Neo4j Core

The neo4j gem uses the neo4j-core gem, see /~https://github.com/andreasronge/neo4j-core See /~https://github.com/neo4jrb/neo4j-core/tree/3.0

Clone this wiki locally