I started off a Ruby on Rails Project which includes a simple recommender system with ActiveRecord and Neography. Now I found out about neo4j.rb, which is going to simplify my life by a lot. :-)
I learned by now, that I could create a new Application without ActiveRecord as follows:
rails new xyz -O
I could do that and copy paste most of my files / code into that new project. Or is there an easier way?
I am still thinking about if that step is even necessary. Is it possible to use both neo4j.rb and ActiveRecord in parallel? I am thinking of running the authentication system (e.g. Devise) with ActiveRecord and my recommender system in neo4j. Does anyone have experiences with such an approach?
1 What is Active Record? Active Record is the M in MVC - the model - which is the layer of the system responsible for representing business data and logic. Active Record facilitates the creation and use of business objects whose data requires persistent storage to a database.
ActiveRecord is commonly used with the Ruby-on-Rails framework but you can use it with Sinatra or without any web framework if desired.
Rails delete operation using destroy methodBy using destroy, you can delete the record from rails as well as its other existing dependencies. So in the context of our rails application, if we delete a book record using the destroy function, the authors associated with the book will also be deleted.
Follow these steps
Remove database adapter gems from your Gemfile, e.g., mysql2, sqlite3, etc
From application.rb
, remove require 'rails/all'
and require frameworks (among those available in your rails
version, the list varies, do not just copy) you want to use, for example:
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"
Delete database.yml
, schema.rb
and all the migrations
test/test_helper.rb
config/environments
Hope this helps!
Source - Disable ActiveRecord for Rails 4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With