6fd8b79e1c4f3a34bd3e580ab10b58d24157c073
ActiveRecord Without Rails
Just a simple example of using ActiveRecord migrations without Rails
tasks you can do:
rake db:createrake db:migraterake db:drop
Or, you can run the thing to show that it'll connect
ruby ar-no-rails
Output:
Count of Pages: 0
Lastly, you can IRB it to do stuff:
$ irb
>> require "./ar-no-rails"
=> true
>> Page.new
=> #<Page id: nil, content: nil, published: false>
>> Page.create content: "the-content"
=> #<Page id: 1, content: "the-content", published: false>
Copyright
None. Really.
Languages
Ruby
93.5%
Dockerfile
2.9%
Python
2.4%
Shell
1.2%