[refs #396] Fix token migration. Fix atom link tag title
This commit is contained in:
parent
cd153375dd
commit
2fc4e2db61
|
@ -9,7 +9,7 @@
|
|||
= javascript_include_tag "application"
|
||||
= csrf_meta_tag
|
||||
= display_meta_tags :site => APP_CONFIG['project_name'], :reverse => true, :separator => '-'
|
||||
= auto_discovery_link_tag :atom, root_path + '.atom', :title => "Rosalab News Feed"
|
||||
= auto_discovery_link_tag :atom, root_path + '.atom', :title => t("layout.atom_link_tag_title", :nickname => current_user.name, :app_name => APP_CONFIG['project_name'])
|
||||
|
||||
%body
|
||||
.wrap{:class => content_for?(:sidebar) ? 'columns' : ''}
|
||||
|
|
|
@ -44,6 +44,7 @@ en:
|
|||
back: Back
|
||||
processing: working ...
|
||||
invalid_content_type: incorrect type
|
||||
atom_link_tag_title: Private feed for %{nickname} | %{app_name}
|
||||
|
||||
settings:
|
||||
label: Settings
|
||||
|
|
|
@ -44,6 +44,7 @@ ru:
|
|||
back: Назад
|
||||
processing: Обрабатывается...
|
||||
invalid_content_type: имеет неверный тип
|
||||
atom_link_tag_title: Приватная лента для %{nickname} | %{app_name}
|
||||
|
||||
settings:
|
||||
label: 'Настройки'
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
class AddTokenAuthenticatableToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
change_table :users do |t|
|
||||
t.token_authenticatable
|
||||
end
|
||||
|
||||
def self.up
|
||||
add_column :users, :authentication_token, :string
|
||||
add_index :users, :authentication_token
|
||||
|
||||
User.all.each do |user|
|
||||
user.ensure_authentication_token!
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :authentication_token
|
||||
remove_index :users, :authentication_token
|
||||
end
|
||||
end
|
||||
|
|
|
@ -350,6 +350,7 @@ ActiveRecord::Schema.define(:version => 20120418100619) do
|
|||
t.string "authentication_token"
|
||||
end
|
||||
|
||||
add_index "users", ["authentication_token"], :name => "index_users_on_authentication_token"
|
||||
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
|
||||
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
||||
|
|
Loading…
Reference in New Issue