change database

This commit is contained in:
May Zin Oo
2018-03-05 11:13:37 +06:30
34 changed files with 22441 additions and 89 deletions

View File

@@ -4,25 +4,23 @@
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: postgresql
# host: http://192.168.1.81
pool: 5
timeout: 5000
encoding: utf8
development:
<<: *default
database: nemo_production
username: mayzin
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: nemo_encoder_production_test
default: &default
adapter: postgresql
production:
<<: *default
database: nemo
username: deploy
password: OU771o3ja3Hn4$r
pool: 5
timeout: 5000
encoding: utf8

View File

@@ -6,7 +6,7 @@ Rails.application.routes.draw do
root :to => 'home#index'
get "dashboard", to: "home#dashboard", as: "dashboard"
resources :batches,:only =>[:index]
resources :batches
devise_for :members
resources :batch_line_items,:only =>[:index]
resources :users
@@ -22,6 +22,10 @@ Rails.application.routes.draw do
match 'batch_line_items/export' => 'batch_line_items#export', :as => 'export', :via => [:post ,:get]
get 'get_batch' => 'batch_line_items#get_batch',:as => 'get_batch'
get 'generate_cards/:id' => 'batch_line_items#generate_cards',:as => 'generate_cards'
post "generate_card_account_items" =>"batch_line_items#generate_card_account_items"
namespace :api, defaults: {format: :json} do
#login
post "auth/login" =>"auth#login"