add new file

This commit is contained in:
Sunandar
2017-01-24 17:45:12 +06:30
parent af7be218be
commit 2f427ae5b9
11 changed files with 130 additions and 33 deletions

View File

@@ -11,5 +11,8 @@ module NemoEncoder
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.before_initialize do
Rails.configuration.nemoencoder_configuration = YAML.load_file("#{Rails.root}/config/config.yml")
end
end
end

View File

@@ -5,20 +5,21 @@
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
adapter: postgresql
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
database: nemo_encoder
username: nda
# 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: db/test.sqlite3
database: nemo_encoder
production:
<<: *default

View File

@@ -44,7 +44,7 @@ Rails.application.configure do
# Suppress logger output for asset requests.
config.assets.quiet = true
config.action_mailer.default_url_options = { host: 'localhost', port: 3001 }
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

View File

@@ -36,6 +36,7 @@ Rails.application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
config.action_mailer.default_url_options = { host: 'localhost', port: 3001 }
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

View File

@@ -1,3 +1,32 @@
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
root :to => 'home#index'
get "dashboard", to: "home#dashboard", as: "dashboard"
resources :batches,:only =>[:index]
devise_for :members
resources :batch_line_items,:only =>[:index,:create]
resources :users
#users
get 'check_registered_email' => "users#check_registered_email"
#Encoder
match 'batch_line_items/export' => 'batch_line_items#create', :as => 'export', :via => :post
namespace :api, defaults: {format: :json} do
#login
post "auth/login" =>"auth#login"
post "auth/logout" =>"auth#logout"
#Encoder
post "batch_line_items/register" =>"batch_line_items#register"
#Batch
post "batches" => "batches#create"
post "batches/end" => "batches#batch_end"
get "batches/resume_batch" =>"batches#resume_batch"
get "batches/batch_progress_list" =>"batches#batch_progress_list"
end
end