diff --git a/.gitignore b/.gitignore index 6e10082..c87e5f5 100755 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,8 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile ~/.gitignore_global - -# Ignore bundler config /.bundle - -# Ignore the default SQLite database. +/bin /db/*.sqlite3 - -# Ignore all logfiles and tempfiles. /log/*.log /tmp .elasticbeanstalk/ - -# Ignore Mac folder settings .DS_Store - -# Ignore data directory -/public/data \ No newline at end of file +/public/data diff --git a/Gemfile b/Gemfile index 72031de..1f1f2d9 100755 --- a/Gemfile +++ b/Gemfile @@ -11,13 +11,14 @@ gem 'foreman' group :development do gem 'brakeman' - gem 'guard-brakeman' - gem 'guard-rspec' - gem 'rb-fsevent' - gem 'guard-shell' gem 'bundler-audit' + gem 'guard-brakeman' gem 'guard-livereload' + gem 'guard-rspec' + gem 'guard-shell' + gem 'pry' gem 'rack-livereload' + gem 'rb-fsevent' gem 'travis-lint' end diff --git a/Gemfile.lock b/Gemfile.lock index e82bd83..27bae65 100755 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -237,6 +237,7 @@ DEPENDENCIES jquery-rails minitest (~> 4.0) powder + pry rack-livereload rails (= 3.2.13) rb-fsevent diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 09701a3..b52a43b 100755 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -36,7 +36,7 @@ class UsersController < ApplicationController user = User.find(:first, :conditions => "user_id = '#{params[:user][:user_id]}'") user.skip_user_id_assign = true - user.update_attributes(params[:user].reject { |k| k == ("password" || "password_confirmation") || "user_id" }) + user.update_attributes(params[:user].reject { |k| %w(password password_confirmation user_id).include? k }) pass = params[:user][:password] user.password = pass if !(pass.blank?) message = true if user.save!