-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from justCxx/exercise-16
Complete Exercise 16 (I18n)
- Loading branch information
Showing
34 changed files
with
277 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class ApplicationMailer < ActionMailer::Base | ||
default from: ENV["SMTP_USER"] | ||
default from: "oh-my-flashcards <#{ENV['SMTP_USER']}>" | ||
layout "mailer" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<h3>Колоды (<%= @decks.count %>)</h3> | ||
<h3><%= t :decks %> (<%= @decks.count %>)</h3> | ||
|
||
<table width="100%"> | ||
<tr> | ||
<th>Название</th> | ||
<th>Карточек</th> | ||
<th>Для просмотра</th> | ||
<th><%= Deck.human_attribute_name(:title) %></th> | ||
<th><%= t :cards %></th> | ||
<th><%= t :for_review %></th> | ||
</tr> | ||
|
||
<% @decks.each do |deck| %> | ||
<tr> | ||
<td><%= link_to deck.title, deck_path(deck) %></td> | ||
<td><%= deck.cards.count %></td> | ||
<td><%= deck.cards.for_review.count %></td> | ||
<td><%= link_to 'Редактировать', edit_deck_path(deck) %></td> | ||
<td><%= link_to 'Удалить', deck_path(deck), method: :delete %></td> | ||
<td><%= link_to t(:edit), edit_deck_path(deck) %></td> | ||
<td><%= link_to t(:destroy), deck_path(deck), method: :delete %></td> | ||
</tr> | ||
<% end %> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%= render 'form', deck: @deck %> | ||
<%= render "form", deck: @deck %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<h1>Sign Up!</h1> | ||
|
||
<%= render 'form', user: @user %> | ||
<%= render "form", user: @user %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<h3>Edit profile</h3> | ||
<h3><%= t :user_profile %></h3> | ||
|
||
<%= render "form" %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
<h3>User profile</h3> | ||
<h3><%= t :user_profile %></h3> | ||
|
||
<p>E-mail: <%= current_user.email %></p> | ||
<p>Decks: <%= current_user.decks.count %></p> | ||
<p>Default deck: | ||
<p><%= t :email %>: <%= current_user.email %></p> | ||
<p><%= t :decks %>: <%= current_user.decks.count %></p> | ||
<p><%= User.human_attribute_name(:default_deck) %>: | ||
<% if current_user.default_deck %> | ||
<%= current_user.default_deck.title %> | ||
<% else %> | ||
no default deck | ||
<%= t :no_default_deck %> | ||
<% end %> | ||
<p><%= t :locale %>: <%= current_user.locale %></p> | ||
</p> | ||
|
||
|
||
<%= link_to "Edit", edit_profile_path %> | | ||
<%= link_to "Destroy", profile_path, method: :delete %> | ||
<%= link_to t(:edit), edit_profile_path %> | | ||
<%= link_to t(:destroy), profile_path, method: :delete %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= simple_form_for :user, url: user_sessions_path do |f| %> | ||
<%= f.input :email %> | ||
<%= f.input :password %> | ||
<%= f.button :submit, "Sign In" %> | ||
<%= f.button :submit, (t :signin) %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<h1>Login</h1> | ||
<h1><%= t :login %></h1> | ||
|
||
<%= render "form" %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.