thredded 0.13.4 → 0.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/thredded/components/time_stamps.es6 +1 -1
- data/app/controllers/thredded/moderation_controller.rb +1 -1
- data/app/views/thredded/moderation/users.html.erb +2 -2
- data/app/views/thredded/private_topics/new.html.erb +1 -1
- data/app/views/thredded/shared/nav/_standalone.html.erb +1 -1
- data/app/views/thredded/theme_previews/show.html.erb +6 -4
- data/app/views/thredded/topics/new.html.erb +1 -1
- data/config/locales/en.yml +7 -1
- data/config/locales/es.yml +7 -1
- data/config/locales/fr.yml +7 -1
- data/config/locales/pl.yml +7 -1
- data/config/locales/pt-BR.yml +7 -1
- data/config/locales/ru.yml +7 -1
- data/lib/generators/thredded/install/templates/initializer.rb +2 -2
- data/lib/thredded/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd0d58c2a26339dd5988d86b1d55297db8d3cace
|
|
4
|
+
data.tar.gz: 77fbbf2c0e238e565c0d48156b7473fc7617e716
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1e60000d6f6905352e132302b24bb7a48cf2f9c63c8093da98b6486779c4493bd085ad79a2716c89dd414d72e1088b52f3d46ffc2347aedec08226c5a5591fb
|
|
7
|
+
data.tar.gz: c2f0928832d74cde99927f7f60aa28d131d75904c86e8eaf8a8e33d95364c9717b8f4e0e59b4e752bf955cec4a4c33a3f8c018ec03ea6e969a5fad9fba573909
|
data/README.md
CHANGED
|
@@ -98,7 +98,7 @@ Then, see the rest of this Readme for more information about using and customizi
|
|
|
98
98
|
Add the gem to your Gemfile:
|
|
99
99
|
|
|
100
100
|
```ruby
|
|
101
|
-
gem 'thredded', '~> 0.13.
|
|
101
|
+
gem 'thredded', '~> 0.13.5'
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
Add the Thredded [initializer] to your parent app by running the install generator.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
if (!threddedContainer) return;
|
|
9
9
|
timeago().render(
|
|
10
10
|
document.querySelectorAll(COMPONENT_SELECTOR),
|
|
11
|
-
threddedContainer.getAttribute('data-thredded-locale'));
|
|
11
|
+
threddedContainer.getAttribute('data-thredded-locale').replace('-', '_'));
|
|
12
12
|
});
|
|
13
13
|
document.addEventListener('turbolinks:before-cache', () => {
|
|
14
14
|
timeago.cancel();
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
<caption><%= page_entries_info @users %></caption>
|
|
15
15
|
<thead>
|
|
16
16
|
<tr>
|
|
17
|
-
<th
|
|
18
|
-
<th
|
|
17
|
+
<th><%= t 'thredded.moderation.user.name' %></th>
|
|
18
|
+
<th><%= t 'thredded.moderation.moderation_state.name' %></th>
|
|
19
19
|
</tr>
|
|
20
20
|
</thead>
|
|
21
21
|
<tbody>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<% content_for :thredded_page_title, '
|
|
1
|
+
<% content_for :thredded_page_title, t('thredded.private_topics.create') %>
|
|
2
2
|
<% content_for :thredded_page_id, 'thredded--new-private-topic' %>
|
|
3
3
|
<% content_for :thredded_breadcrumbs, render('thredded/private_topics/breadcrumbs') %>
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<li class="thredded--user-navigation--standalone--session thredded--user-navigation--item">
|
|
2
|
-
<% resource_name = Thredded.user_class_name.underscore %>
|
|
2
|
+
<% resource_name = Thredded.user_class_name.demodulize.underscore %>
|
|
3
3
|
<% if thredded_signed_in? %>
|
|
4
4
|
<%= link_to main_app.send(:"destroy_#{resource_name}_session_path"), method: :delete do %>
|
|
5
5
|
Sign Out
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
<%= content_tag :section, class: 'thredded--thredded--main-section thredded--messageboards' do %>
|
|
12
12
|
<%= render @messageboards %>
|
|
13
13
|
<div class="thredded--messageboard--create">
|
|
14
|
-
<a class="thredded--button" href="<%= new_messageboard_path %>">
|
|
14
|
+
<a class="thredded--button" href="<%= new_messageboard_path %>">
|
|
15
|
+
<%= t 'thredded.messageboard.create' %>
|
|
16
|
+
</a>
|
|
15
17
|
</div>
|
|
16
18
|
<% end %>
|
|
17
19
|
|
|
@@ -21,7 +23,7 @@
|
|
|
21
23
|
<%= render 'thredded/topics/form',
|
|
22
24
|
topic: @new_topic,
|
|
23
25
|
css_class: 'thredded--is-compact',
|
|
24
|
-
placeholder: '
|
|
26
|
+
placeholder: t('thredded.topics.form.title_placeholder_start') %>
|
|
25
27
|
<%= render @topics %>
|
|
26
28
|
<% end %>
|
|
27
29
|
<footer>
|
|
@@ -43,11 +45,11 @@
|
|
|
43
45
|
<%= render 'section_title', label: 'topics#new', href: new_messageboard_topic_path(@messageboard) %>
|
|
44
46
|
<%= render 'thredded/topics/form',
|
|
45
47
|
topic: @new_topic,
|
|
46
|
-
placeholder: '
|
|
48
|
+
placeholder: t('thredded.topics.form.title_placeholder_start') %>
|
|
47
49
|
|
|
48
50
|
<%= render 'section_title', label: 'posts#edit', href: edit_messageboard_topic_post_path(@messageboard, @post.postable, @post) %>
|
|
49
51
|
<%= content_tag :section, class: 'thredded--thredded--main-section posts-form' do %>
|
|
50
|
-
<h3 class="thredded--post-form--title"
|
|
52
|
+
<h3 class="thredded--post-form--title"><%= t 'thredded.posts.edit' %></h3>
|
|
51
53
|
|
|
52
54
|
<%= render 'thredded/posts/form',
|
|
53
55
|
post: @post_form,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<% content_for :thredded_page_title, '
|
|
1
|
+
<% content_for :thredded_page_title, t('thredded.topics.create') %>
|
|
2
2
|
<% content_for :thredded_page_id, 'thredded--new-topic' %>
|
|
3
3
|
<% content_for :thredded_breadcrumbs, render('thredded/shared/breadcrumbs') %>
|
|
4
4
|
|
data/config/locales/en.yml
CHANGED
|
@@ -28,7 +28,7 @@ en:
|
|
|
28
28
|
email_sent_reason_html: 'This email was sent to you because you are following this topic: “<a href="%{post_url}">%{topic_title}</a>”.'
|
|
29
29
|
post_lead_html: '%{user} <a href="%{post_url}">said in “%{topic_title}”</a>:'
|
|
30
30
|
unsubscribe_instructions_html: To unsubscribe from these emails, update your <a href="%{preferences_url}">preferences</a>.
|
|
31
|
-
subject: A new post in “%{topic_title}”
|
|
31
|
+
subject: A new post in “%{topic_title}”
|
|
32
32
|
text:
|
|
33
33
|
email_sent_reason: |-
|
|
34
34
|
This email was sent to you because you are following
|
|
@@ -73,6 +73,8 @@ en:
|
|
|
73
73
|
moderation:
|
|
74
74
|
approve_btn: Approve
|
|
75
75
|
block_btn: Block
|
|
76
|
+
moderation_state:
|
|
77
|
+
name: Moderation state
|
|
76
78
|
pending:
|
|
77
79
|
empty:
|
|
78
80
|
content: All posts have been moderated.
|
|
@@ -88,6 +90,8 @@ en:
|
|
|
88
90
|
form_placeholder: :thredded.moderation.search_users.form_label
|
|
89
91
|
no_results_message: No users with name starting with %{query}
|
|
90
92
|
results_message: Users with names starting with %{query}
|
|
93
|
+
user:
|
|
94
|
+
name: User
|
|
91
95
|
nav:
|
|
92
96
|
all_messageboards: All Messageboards
|
|
93
97
|
edit_messageboard: Edit Messageboard
|
|
@@ -154,6 +158,7 @@ en:
|
|
|
154
158
|
create_btn_submitting: Sending...
|
|
155
159
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
156
160
|
private_topics:
|
|
161
|
+
create: :thredded.private_topics.form.create_btn
|
|
157
162
|
edit: Edit
|
|
158
163
|
errors:
|
|
159
164
|
user_ids_length: Please specify at least one other user.
|
|
@@ -180,6 +185,7 @@ en:
|
|
|
180
185
|
placeholder: Search Topics and Posts
|
|
181
186
|
time_ago: "%{time} ago"
|
|
182
187
|
topics:
|
|
188
|
+
create: :thredded.topics.form.create_btn
|
|
183
189
|
delete_confirm: Are you sure you want to delete this topic? This CANNOT be undone.
|
|
184
190
|
delete_topic: Delete Topic
|
|
185
191
|
deleted_notice: Topic deleted
|
data/config/locales/es.yml
CHANGED
|
@@ -30,7 +30,7 @@ es:
|
|
|
30
30
|
post_lead_html: '%{user} <a href="%{post_url}">dijo en "%{topic_title}"</a>:'
|
|
31
31
|
unsubscribe_instructions_html: >-
|
|
32
32
|
Para cancelar la suscripción a estos correos electrónicos, actualice sus <a href="%{preferences_url}">preferencias</a>.
|
|
33
|
-
subject: Un nuevo mensaje en "%{topic_title}"
|
|
33
|
+
subject: Un nuevo mensaje en "%{topic_title}"
|
|
34
34
|
text:
|
|
35
35
|
email_sent_reason: |-
|
|
36
36
|
Este correo electrónico se te envió porque estás siguiendo
|
|
@@ -75,6 +75,8 @@ es:
|
|
|
75
75
|
moderation:
|
|
76
76
|
approve_btn: Aprobar
|
|
77
77
|
block_btn: Rechazar
|
|
78
|
+
moderation_state:
|
|
79
|
+
name: Estado de moderación
|
|
78
80
|
pending:
|
|
79
81
|
empty:
|
|
80
82
|
content: Todos los mensajes han sido moderados.
|
|
@@ -90,6 +92,8 @@ es:
|
|
|
90
92
|
form_placeholder: :thredded.moderation.search_users.form_label
|
|
91
93
|
no_results_message: No existen usuarios con el nombre empezando por %{query}
|
|
92
94
|
results_message: Usuarios cuyo nombre empieza por %{query}
|
|
95
|
+
user:
|
|
96
|
+
name: Usuario
|
|
93
97
|
nav:
|
|
94
98
|
all_messageboards: Todos los Foros
|
|
95
99
|
edit_messageboard: Editar Foro
|
|
@@ -158,6 +162,7 @@ es:
|
|
|
158
162
|
create_btn_submitting: Enviando...
|
|
159
163
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
160
164
|
private_topics:
|
|
165
|
+
create: :thredded.private_topics.form.create_btn
|
|
161
166
|
edit: Editar
|
|
162
167
|
errors:
|
|
163
168
|
user_ids_length: Por favor, introduce el nombre de al menos un usuario.
|
|
@@ -184,6 +189,7 @@ es:
|
|
|
184
189
|
placeholder: Busca Temas y Mensajes
|
|
185
190
|
time_ago: hace %{time}
|
|
186
191
|
topics:
|
|
192
|
+
create: :thredded.topics.form.create_btn
|
|
187
193
|
delete_confirm: "¿Seguro que queires eliminar este tema? Esta acción NO se puede deshacer."
|
|
188
194
|
delete_topic: Eliminar Tema
|
|
189
195
|
deleted_notice: Tema eliminado
|
data/config/locales/fr.yml
CHANGED
|
@@ -28,7 +28,7 @@ fr:
|
|
|
28
28
|
email_sent_reason_html: 'Ce courriel vous a été envoyé car vous suivez ce sujet: "<a href="%{post_url}">%{topic_title}</a>".'
|
|
29
29
|
post_lead_html: '%{user} a <a href="%{post_url}">déclaré dans "%{topic_title}"</a>:'
|
|
30
30
|
unsubscribe_instructions_html: Pour vous désabonner de ces courriels, mettez à jour vos <a href="%{preferences_url}">préférences</a>.
|
|
31
|
-
subject: Une nouvelle publication dans "%{topic_title}"
|
|
31
|
+
subject: Une nouvelle publication dans "%{topic_title}"
|
|
32
32
|
text:
|
|
33
33
|
email_sent_reason: |-
|
|
34
34
|
Ce courriel vous a été envoyé parce que vous suivez
|
|
@@ -73,6 +73,8 @@ fr:
|
|
|
73
73
|
moderation:
|
|
74
74
|
approve_btn: Approuver
|
|
75
75
|
block_btn: Bloqué
|
|
76
|
+
moderation_state:
|
|
77
|
+
name: État de modération
|
|
76
78
|
pending:
|
|
77
79
|
empty:
|
|
78
80
|
content: Tous les commentaires ont été modérés.
|
|
@@ -88,6 +90,8 @@ fr:
|
|
|
88
90
|
form_placeholder: :thredded.moderation.search_users.form_label
|
|
89
91
|
no_results_message: Aucun utilisateur avec un nom commençant par %{query}
|
|
90
92
|
results_message: Utilisateurs avec le nom commençant par %{query}
|
|
93
|
+
user:
|
|
94
|
+
name: Utilisateur
|
|
91
95
|
nav:
|
|
92
96
|
all_messageboards: Toutes les catégories
|
|
93
97
|
edit_messageboard: Éditer la catégorie
|
|
@@ -155,6 +159,7 @@ fr:
|
|
|
155
159
|
create_btn_submitting: Message en cours d'envoi...
|
|
156
160
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
157
161
|
private_topics:
|
|
162
|
+
create: :thredded.private_topics.form.create_btn
|
|
158
163
|
edit: Éditer
|
|
159
164
|
errors:
|
|
160
165
|
user_ids_length: Spécifier au moins un autre utilisateur.
|
|
@@ -181,6 +186,7 @@ fr:
|
|
|
181
186
|
placeholder: Rechercher un Sujet ou un Commentaire
|
|
182
187
|
time_ago: il y a %{time}
|
|
183
188
|
topics:
|
|
189
|
+
create: :thredded.topics.form.create_btn
|
|
184
190
|
delete_confirm: Êtes-vous sur de vouloir supprimer ce sujet ? Cette action est irréversible.
|
|
185
191
|
delete_topic: Supprimer le Sujet
|
|
186
192
|
deleted_notice: Sujet supprimé
|
data/config/locales/pl.yml
CHANGED
|
@@ -28,7 +28,7 @@ pl:
|
|
|
28
28
|
email_sent_reason_html: 'Ten e-mail został wysłany do Ciebie, ponieważ śledzisz ten temat: "<a href="%{post_url}">%{topic_title}</a>".'
|
|
29
29
|
post_lead_html: '%{user} <a href="%{post_url}">powiedział w "%{topic_title}"</a>:'
|
|
30
30
|
unsubscribe_instructions_html: Aby wypisać się z tych e-maili, zaktualizuj swoje <a href="%{preferences_url}">preferencje</a>.
|
|
31
|
-
subject: Nowy post w "%{topic_title}"
|
|
31
|
+
subject: Nowy post w "%{topic_title}"
|
|
32
32
|
text:
|
|
33
33
|
email_sent_reason: |-
|
|
34
34
|
Ten e-mail został wysłany do Ciebie, ponieważ śledzisz
|
|
@@ -73,6 +73,8 @@ pl:
|
|
|
73
73
|
moderation:
|
|
74
74
|
approve_btn: Zaakceptuj
|
|
75
75
|
block_btn: Zablokuj
|
|
76
|
+
moderation_state:
|
|
77
|
+
name: Stan moderacji
|
|
76
78
|
pending:
|
|
77
79
|
empty:
|
|
78
80
|
content: Wszystkie posty zostały zweryfikowane.
|
|
@@ -88,6 +90,8 @@ pl:
|
|
|
88
90
|
form_placeholder: :thredded.moderation.search_users.form_label
|
|
89
91
|
no_results_message: 'Brak użytkowników zaczynających się od: %{query}'
|
|
90
92
|
results_message: 'Użytkownicy zaczynający się od: %{query}'
|
|
93
|
+
user:
|
|
94
|
+
name: Użytkownik
|
|
91
95
|
nav:
|
|
92
96
|
all_messageboards: Wszystkie tablice
|
|
93
97
|
edit_messageboard: Edytuj tablicę
|
|
@@ -154,6 +158,7 @@ pl:
|
|
|
154
158
|
create_btn_submitting: Wysyłanie
|
|
155
159
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
156
160
|
private_topics:
|
|
161
|
+
create: :thredded.private_topics.form.create_btn
|
|
157
162
|
edit: Edytuj
|
|
158
163
|
errors:
|
|
159
164
|
user_ids_length: Proszę dodać przynajmniej jednego innego użytkownika.
|
|
@@ -180,6 +185,7 @@ pl:
|
|
|
180
185
|
placeholder: Wyszukaj tematy i posty.
|
|
181
186
|
time_ago: "%{time} temu"
|
|
182
187
|
topics:
|
|
188
|
+
create: :thredded.topics.form.create_btn
|
|
183
189
|
delete_confirm: Jesteś pewien, że chcesz usunąć ten temat? Tej operacji nie można cofnąć.
|
|
184
190
|
delete_topic: Usuń temat
|
|
185
191
|
deleted_notice: Temat usunięty.
|
data/config/locales/pt-BR.yml
CHANGED
|
@@ -29,7 +29,7 @@ pt-BR:
|
|
|
29
29
|
Este e-mail foi enviado para você porque você está seguindo este tópico: "<a href="%{post_url}">%{topic_title}</a>".
|
|
30
30
|
post_lead_html: '%{user} <a href="%{post_url}">disse em "%{topic_title}"</a>:'
|
|
31
31
|
unsubscribe_instructions_html: Para cancelar a inscrição desses e-mails, atualize suas <a href="%{preferences_url}">preferências</a>.
|
|
32
|
-
subject: Uma nova postagem em "%{topic_title}"
|
|
32
|
+
subject: Uma nova postagem em "%{topic_title}"
|
|
33
33
|
text:
|
|
34
34
|
email_sent_reason: |-
|
|
35
35
|
Este e-mail foi enviado para você porque você está seguindo
|
|
@@ -74,6 +74,8 @@ pt-BR:
|
|
|
74
74
|
moderation:
|
|
75
75
|
approve_btn: Aprovar
|
|
76
76
|
block_btn: Quadra
|
|
77
|
+
moderation_state:
|
|
78
|
+
name: Estado de moderação
|
|
77
79
|
pending:
|
|
78
80
|
empty:
|
|
79
81
|
content: Todas as mensagens têm sido moderadas.
|
|
@@ -89,6 +91,8 @@ pt-BR:
|
|
|
89
91
|
form_placeholder: :thredded.moderation.search_users.form_label
|
|
90
92
|
no_results_message: Nenhum usuário com o nome começando com %{query}
|
|
91
93
|
results_message: Os usuários com nomes começando com %{query}
|
|
94
|
+
user:
|
|
95
|
+
name: Usuário
|
|
92
96
|
nav:
|
|
93
97
|
all_messageboards: Todos os Fóruns de Mensagens
|
|
94
98
|
edit_messageboard: Editar Fórum de Mensagem
|
|
@@ -158,6 +162,7 @@ pt-BR:
|
|
|
158
162
|
create_btn_submitting: Enviando...
|
|
159
163
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
160
164
|
private_topics:
|
|
165
|
+
create: :thredded.private_topics.form.create_btn
|
|
161
166
|
edit: Editar
|
|
162
167
|
errors:
|
|
163
168
|
user_ids_length: Por favor, especifique pelo menos mais um usuário.
|
|
@@ -184,6 +189,7 @@ pt-BR:
|
|
|
184
189
|
placeholder: Buscar Tópicos e Posts
|
|
185
190
|
time_ago: há %{time}
|
|
186
191
|
topics:
|
|
192
|
+
create: :thredded.topics.form.create_btn
|
|
187
193
|
delete_confirm: Você tem certeza que deseja remover este tópico? Isto não pode ser desfeito.
|
|
188
194
|
delete_topic: Remover Tópico
|
|
189
195
|
deleted_notice: Tópico removido
|
data/config/locales/ru.yml
CHANGED
|
@@ -28,7 +28,7 @@ ru:
|
|
|
28
28
|
email_sent_reason_html: 'Это письмо было отправлено вам, потому что вы подписаны на тему: «<a href="%{post_url}">%{topic_title}</a>».'
|
|
29
29
|
post_lead_html: '%{user} в <a href="%{post_url}">«%{topic_title}»</a>:'
|
|
30
30
|
unsubscribe_instructions_html: Чтобы отписаться от этих писем, обновите свои <a href="%{preferences_url}">настройки</a>.
|
|
31
|
-
subject: Новое сообщение в «%{topic_title}»
|
|
31
|
+
subject: Новое сообщение в «%{topic_title}»
|
|
32
32
|
text:
|
|
33
33
|
email_sent_reason: |-
|
|
34
34
|
Это письмо было отправлено вам, потому что вы подписаны на тему «%{topic_title}».
|
|
@@ -72,6 +72,8 @@ ru:
|
|
|
72
72
|
moderation:
|
|
73
73
|
approve_btn: Одобрить
|
|
74
74
|
block_btn: Заблокировать
|
|
75
|
+
moderation_state:
|
|
76
|
+
name: Состояние модерации
|
|
75
77
|
pending:
|
|
76
78
|
empty:
|
|
77
79
|
content: Все посты промодерированы.
|
|
@@ -86,6 +88,8 @@ ru:
|
|
|
86
88
|
form_placeholder: :thredded.moderation.search_users.form_label
|
|
87
89
|
no_results_message: Не найдено пользователей %{query}
|
|
88
90
|
results_message: Пользователи, начинающиеся с ... %{query}
|
|
91
|
+
user:
|
|
92
|
+
name: Пользователь
|
|
89
93
|
nav:
|
|
90
94
|
all_messageboards: Все форумы
|
|
91
95
|
edit_messageboard: Редактировать форум
|
|
@@ -152,6 +156,7 @@ ru:
|
|
|
152
156
|
create_btn_submitting: Посылаю...
|
|
153
157
|
update_btn_submitting: :thredded.form.update_btn_submitting
|
|
154
158
|
private_topics:
|
|
159
|
+
create: :thredded.private_topics.form.create_btn
|
|
155
160
|
edit: Редактировать
|
|
156
161
|
errors:
|
|
157
162
|
user_ids_length: Выберите хотя-бы одного пользователя.
|
|
@@ -178,6 +183,7 @@ ru:
|
|
|
178
183
|
placeholder: Поиск тем или записей
|
|
179
184
|
time_ago: "%{time} назад"
|
|
180
185
|
topics:
|
|
186
|
+
create: :thredded.topics.form.create_btn
|
|
181
187
|
delete_confirm: Вы уверены что хотите удалить эту тему? Это безвозвратно.
|
|
182
188
|
delete_topic: Удалить тему
|
|
183
189
|
deleted_notice: Тема "удалена"
|
|
@@ -20,12 +20,12 @@ Thredded.user_name_column = :name
|
|
|
20
20
|
# When linking to a user, Thredded will use this lambda to spit out
|
|
21
21
|
# the path or url to your user. This lambda is evaluated in the view context.
|
|
22
22
|
Thredded.user_path = lambda do |user|
|
|
23
|
-
user_path = :"#{Thredded.user_class_name.underscore}_path"
|
|
23
|
+
user_path = :"#{Thredded.user_class_name.demodulize.underscore}_path"
|
|
24
24
|
main_app.respond_to?(user_path) ? main_app.send(user_path, user) : "/users/#{user.to_param}"
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# This method is used by Thredded controllers and views to fetch the currently signed-in user
|
|
28
|
-
Thredded.current_user_method = :"current_#{Thredded.user_class_name.underscore}"
|
|
28
|
+
Thredded.current_user_method = :"current_#{Thredded.user_class_name.demodulize.underscore}"
|
|
29
29
|
|
|
30
30
|
# User avatar URL. rb-gravatar gem is used by default:
|
|
31
31
|
Thredded.avatar_url = ->(user) { Gravatar.src(user.email, 156, 'mm') }
|
data/lib/thredded/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: thredded
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.13.
|
|
4
|
+
version: 0.13.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joel Oliveira
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-
|
|
12
|
+
date: 2017-10-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: pundit
|