Skip to content

Commit

Permalink
fixed user_path
Browse files Browse the repository at this point in the history
  • Loading branch information
sashazykov committed Jan 12, 2015
1 parent 053f80f commit 28e90d3
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/projects.js.coffee
Expand Up @@ -6,4 +6,4 @@ init = () ->
$('.qrcode').each () ->
$(this).qrcode($(this).attr('data-qrcode'));

$(document).on 'ready page:load', init
$(document).on 'ready page:load', init
12 changes: 6 additions & 6 deletions app/assets/javascripts/users.js.coffee
Expand Up @@ -8,21 +8,21 @@ load_bootstrap_validator = ->
message: I18n.t('js.errors.email.invalid')
notEmpty:
message: I18n.t('js.errors.email.blank')

"user[password]":
validators:
notEmpty:
message: I18n.t('js.errors.password.blank')
identical:
field: 'user[password_confirmation]'
field: 'user[password_confirmation]'
message: I18n.t('js.errors.password.invalid')

"user[password_confirmation]":
validators:
notEmpty:
message: I18n.t('js.errors.password_confirmation.blank')
identical:
field: 'user[password]'
field: 'user[password]'
message: I18n.t('js.errors.password_confirmation.invalid')
$('.session_form').bootstrapValidator
message: I18n.t('js.errors.value.invalid')
Expand All @@ -33,10 +33,10 @@ load_bootstrap_validator = ->
message: I18n.t('js.errors.email.invalid')
notEmpty:
message: I18n.t('js.errors.email.blank')

"user[password]":
validators:
notEmpty:
message: I18n.t('js.errors.password_confirmation.blank')

$(document).on "ready page:load", load_bootstrap_validator
$(document).on "ready page:load", load_bootstrap_validator
2 changes: 1 addition & 1 deletion app/models/deposit.rb
Expand Up @@ -26,4 +26,4 @@ def project_name
project.full_name
end

end
end
2 changes: 1 addition & 1 deletion app/views/common/_menu.html.haml
Expand Up @@ -2,4 +2,4 @@
%li{class: controller_name == 'home' ? 'active' : ''}
%a{href: root_path}= t('menu.home')
%li{class: controller_name == 'projects' || @project ? 'active' : ''}
%a{href: projects_path}= t('menu.projects')
%a{href: projects_path}= t('menu.projects')
6 changes: 3 additions & 3 deletions app/views/user_mailer/check_bitcoin_address.html.haml
Expand Up @@ -6,9 +6,9 @@
%strong= @user.bitcoin_address

%p
If this address is not yours, please
If this address is not yours, please
= link_to 'update it', login_users_url(token: @user.login_token)

%p Thank you for contributing to Open Source and sorry for troubles!

%p= link_to "tip4commit.com", "http://tip4commit.com/"
%p= link_to "tip4commit.com", "http://tip4commit.com/"
2 changes: 1 addition & 1 deletion app/views/users/index.html.haml
Expand Up @@ -9,7 +9,7 @@
%tbody
- @users.each do |user|
%tr
%td
%td
- if user.nickname.blank?
= user.display_name
- else
Expand Down
4 changes: 2 additions & 2 deletions config/database.yml.sample
Expand Up @@ -23,5 +23,5 @@ production:
encoding: utf8
database: tip4commit
username: root
password:
socket: /var/run/mysqld/mysqld.sock
password:
socket: /var/run/mysqld/mysqld.sock
2 changes: 1 addition & 1 deletion config/deploy.rb
Expand Up @@ -40,4 +40,4 @@

after :finishing, 'deploy:cleanup'

end
end
2 changes: 1 addition & 1 deletion config/environments/development.rb
Expand Up @@ -16,7 +16,7 @@
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

config.action_mailer.default_url_options = { :host => "localhost:3000" }
config.action_mailer.default_url_options = { :host => "localhost:3000" }

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
Expand Down
2 changes: 1 addition & 1 deletion config/i18n-js.yml
@@ -1,3 +1,3 @@
translations:
- file: "app/assets/javascripts/i18n/translations.js"
only: ['*.js']
only: ['*.js']
2 changes: 1 addition & 1 deletion config/initializers/demoji.rb
@@ -1 +1 @@
ActiveRecord::Base.send :include, Demoji
ActiveRecord::Base.send :include, Demoji
2 changes: 1 addition & 1 deletion config/initializers/mime_types.rb
Expand Up @@ -3,4 +3,4 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
Mime::Type.register "image/svg+xml", :svg
Mime::Type.register "image/svg+xml", :svg
1 change: 1 addition & 0 deletions config/routes.rb
Expand Up @@ -10,6 +10,7 @@
get '/users/login' => 'users#login' , :as => 'login_users'
get '/users/:user_id/tips' => 'tips#index' , :constraints => {:user_id => /\d+/} , :as => 'user_tips'
get '/users/:nickname/tips' => 'tips#index' , :constraints => {:nickname => /\w[\d\w\-]*/} , :as => 'user_tips_pretty'
get '/users/:id' => 'users#show' , :constraints => {:id => /\d+/} , :as => 'user'
get '/users/:nickname' => 'users#show' , :constraints => {:nickname => /\w[\d\w\-]*/} , :as => 'user_pretty'

get '/projects/:project_id/tips' => 'tips#index' , :constraints => {:project_id => /\d+/} , :as => 'project_tips'
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140620123610_add_decided_at_to_tips.rb
Expand Up @@ -2,4 +2,4 @@ class AddDecidedAtToTips < ActiveRecord::Migration
def change
add_column :tips, :decided_at, :timestamp
end
end
end
2 changes: 1 addition & 1 deletion lib/bitcoin_address_validator.rb
Expand Up @@ -26,7 +26,7 @@ def valid_bitcoin_address?(address)

def version(address)
decoded = b58_decode(address, 25)

version = decoded[0, 1]
checksum = decoded[-4, decoded.length]
vh160 = decoded[0, decoded.length - 4]
Expand Down
2 changes: 1 addition & 1 deletion public/robots.txt
@@ -1,3 +1,3 @@
User-agent: *
Disallow: /users/
Crawl-delay: 10
Crawl-delay: 10
2 changes: 1 addition & 1 deletion spec/models/user_spec.rb
Expand Up @@ -48,4 +48,4 @@
end

end
end
end

0 comments on commit 28e90d3

Please sign in to comment.