Commit beb1dd83 authored by cp's avatar cp

some small fixes

git-svn-id: http://svn.sp-service.com.ua/svnroot/svn/base_site/trunk@8 d975c5f9-4e99-4c31-b122-d878075b96d9
parent 3cd81164
......@@ -55,20 +55,6 @@ class AccountsController < AdminController
end
private
def select_accounts
if params.has_key? :vacancy
@title = params[:vacancy].pluralize.humanize
Account.where(vacancy: Vacancy.find_by(name: params[:vacancy]))
elsif params.has_key? :referrer
referrer = Account.find(params[:referrer])
@title = "Referrals of #{referrer.email}"
paginate Account.where(referrer: referrer)
else
Account.all
end
end
# Use callbacks to share common setup or constraints between actions.
def set_account
@account = Account.find(params[:id])
......@@ -80,7 +66,6 @@ class AccountsController < AdminController
params[:account][:password] = nil
params[:account][:password_confirmation] = nil
end
params.require(:account).permit(:email, :wallet_address, :on_hold, :referrer_id, :subscribed, :admin,
:password, :password_confirmation)
params.require(:account).permit(:email, :on_hold, :subscribed, :admin, :password, :password_confirmation)
end
end
......@@ -37,7 +37,7 @@ class ApplicationController < ActionController::Base
end
def self.default_url_options(options={})
options.merge({locale: I18n.locale})
options.merge({locale: I18n.available_locales.length > 1 ? I18n.locale: nil})
end
end
......@@ -2,10 +2,10 @@
lock '3.6.1'
# DEPLOY
set :application, 'haba_plastics'
set :application, 'base_site'
# set :deploy_to, '/var/www/amaox' # Default deploy_to directory is /var/www/my_app_name
set :scm, :svn
set :repo_url, 'http://svn.sp-service.com.ua/svnroot/svn/haba_plastics/trunk'
set :repo_url, 'http://svn.sp-service.com.ua/svnroot/svn/base_site/trunk'
# set :format, :pretty # Default value for :format is :pretty
# set :log_level, :debug # Default value for :log_level is :debug
# set :pty, true # Default value for :pty is false
......@@ -16,7 +16,7 @@ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'public/uploads', 'files')
# RVM
# set :rvm_type, :user # Defaults to: :auto
set :rvm_ruby_version, '2.1.5' # Defaults to: 'default'
set :rvm_ruby_version, '2.3.3' # Defaults to: 'default'
# set :rvm_custom_path, '~/.rvm' # only needed if not detected
# RAILS
......
......@@ -46,7 +46,7 @@ Rails.application.configure do
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
config.log_level = :error
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
......
......@@ -4,7 +4,7 @@ class CreateBlockVersions < ActiveRecord::Migration
t.integer :account_id
t.boolean :active
t.timestamps
t.timestamps null: false
end
add_index :block_versions, :active
add_index :block_versions, :account_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment