Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

dynamic database connection in rails

ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:host => 'localhost',
:username => 'name',
:password => 'password',
:database => 'db_name'
)
Comment

PREVIOUS NEXT
Code Example
Ruby :: ruby raise to power 
Ruby :: rails server not updating 
Ruby :: how to update model rails 
Ruby :: ruby on rails binding.pry 
Ruby :: select tag . Default value rails 
Ruby :: string ruby 
Ruby :: ruby abs function programming 
Ruby :: rails subdomain 
Ruby :: ruby on rails 
Ruby :: ruby function arguments 
Ruby :: gem friendly_id with multiple column s 
Ruby :: ruby merge arrays unique 
Ruby :: rails class note reminders 
Ruby :: ruby named parameters 
Ruby :: rspec match optional keyword arguments 
Ruby :: add several columns rails 
Ruby :: how to know current schema database in rails 
Ruby :: dependent destroy, only the foreign key 
Ruby :: how to install webpck on ubuntu globally 
Ruby :: save rails c output 
Ruby :: ruby read file line by line 
R :: remove package in r 
R :: how to add new value in R list 
R :: plot3d in r 
R :: write to csv in r 
R :: r remove all string before : in r data frame 
R :: operators R 
R :: percent of missing data in df r 
R :: Derive end of the week date in r 
R :: how to split unsplit data frame in R 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =