|
You are here |
blog.arkency.com | ||
| | | | |
fractaledmind.github.io
|
|
| | | | | This is my personal site, where I write about Ruby, programming, and any of my varied fascinations. | |
| | | | |
tenderlovemaking.com
|
|
| | | | | File.open('somefile.txt', 'wb') do |fh| # Open the file fh.write "hello world" # Do some work with the file end # Close file when block returns ActiveRecord::Base.establish_connection( :adapter => "sqlite", :database => "path/to/dbfile") connection_handle = ActiveRecord::Base.connection def retrieve_connection_pool(klass) pool = @connection_pools[klass.name] return pool if pool return nil if ActiveRecord::Base == klass retrieve_connection_pool klass.superclass end spec = ActiveRecord::Base.specificiation ActiveRecord::ConnectionPool.open(spec) do |conn| ... end spec = database_a ActiveRecord::ConnectionPool.open(spec) do |conn| User.find_all end spec = database_b ActiveRecord::ConnectionPool.open(spec) do |conn| User.find_all end # Retrieve the connection as... | |
| | | | |
janko.io
|
|
| | | | | When I started developing the Rails integration for Rodauth, one of the first problems I needed to solve was how to make Rodauth work seamlessly with Active Record, given that it uses Sequel for database interaction. I believed these two could coexist together, because Sequel is mostly hidden from the Rodauth user anyway, and all that really matters is that Rodauth's SQL statements get executed on the database. | |
| | | | |
paragonie.com
|
|
| | | Everything a developer needs to know to build secure software in the PHP programming language in the year 2018 | ||