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