Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
P
parlote-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
parlote-facil
Validations
17d0ddab
Valider
17d0ddab
rédigé
9 years ago
par
Jonne Haß
Parcourir les fichiers
Options
Téléchargements
Plain Diff
Merge branch 'stable' into develop
parents
09a26fbf
0925a265
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
Changelog.md
+2
-1
2 ajouts, 1 suppression
Changelog.md
app/models/user/social_actions.rb
+14
-11
14 ajouts, 11 suppressions
app/models/user/social_actions.rb
spec/models/comment_spec.rb
+9
-0
9 ajouts, 0 suppression
spec/models/comment_spec.rb
avec
25 ajouts
et
12 suppressions
Changelog.md
+
2
−
1
Voir le fichier @
17d0ddab
...
...
@@ -68,6 +68,7 @@ With the port to Bootstrap 3, app/views/terms/default.haml has a new structure.
*
Prevent multiple comment boxes on mobile
[
#6363
](
https://github.com/diaspora/diaspora/pull/6363
)
*
Correctly display location in post preview
[
#6429
](
https://github.com/diaspora/diaspora/pull/6429
)
*
Do not fail when submitting an empty comment in the mobile view
[
#6543
](
https://github.com/diaspora/diaspora/pull/6543
)
*
Limit flash message width on small devices
[
#6529
](
https://github.com/diaspora/diaspora/pull/6529
)
## Features
*
Support color themes
[
#6033
](
https://github.com/diaspora/diaspora/pull/6033
)
...
...
@@ -94,7 +95,7 @@ With the port to Bootstrap 3, app/views/terms/default.haml has a new structure.
*
Correctly skip setting sidekiq logfile on Heroku
[
#6500
](
https://github.com/diaspora/diaspora/pull/6500
)
*
Fix notifications for interactions by non-contacts
[
#6498
](
https://github.com/diaspora/diaspora/pull/6498
)
*
Fix issue where the publisher was broken on profile pages
[
#6503
](
https://github.com/diaspora/diaspora/pull/6503
)
*
Limit flash message width on small device
s
[
#652
9
](
https://github.com/diaspora/diaspora/pull/652
9
)
*
Prevent participations being created for invalid interaction
s
[
#65
5
2
](
https://github.com/diaspora/diaspora/pull/65
5
2
)
## Features
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
app/models/user/social_actions.rb
+
14
−
11
Voir le fichier @
17d0ddab
module
User::SocialActions
def
comment!
(
target
,
text
,
opts
=
{})
update_or_create_participation!
(
target
)
Comment
::
Generator
.
new
(
self
,
target
,
text
).
create!
(
opts
)
Comment
::
Generator
.
new
(
self
,
target
,
text
).
create!
(
opts
).
tap
do
update_or_create_participation!
(
target
)
end
end
def
participate!
(
target
,
opts
=
{})
...
...
@@ -9,21 +10,23 @@ module User::SocialActions
end
def
like!
(
target
,
opts
=
{})
update_or_create_participation!
(
target
)
Like
::
Generator
.
new
(
self
,
target
).
create!
(
opts
)
Like
::
Generator
.
new
(
self
,
target
).
create!
(
opts
).
tap
do
update_or_create_participation!
(
target
)
end
end
def
participate_in_poll!
(
target
,
answer
,
opts
=
{})
update_or_create_participation!
(
target
)
PollParticipation
::
Generator
.
new
(
self
,
target
,
answer
).
create!
(
opts
)
PollParticipation
::
Generator
.
new
(
self
,
target
,
answer
).
create!
(
opts
).
tap
do
update_or_create_participation!
(
target
)
end
end
def
reshare!
(
target
,
opts
=
{})
update_or_create_participation!
(
target
)
reshare
=
build_post
(
:reshare
,
:root_guid
=>
target
.
guid
)
reshare
.
save!
Postzord
::
Dispatcher
.
defer_build_and_post
(
self
,
reshare
)
reshare
build_post
(
:reshare
,
:root_guid
=>
target
.
guid
).
tap
do
|
reshare
|
reshare
.
save!
update_or_create_participation!
(
target
)
Postzord
::
Dispatcher
.
defer_build_and_post
(
self
,
reshare
)
end
end
def
build_comment
(
options
=
{})
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
spec/models/comment_spec.rb
+
9
−
0
Voir le fichier @
17d0ddab
...
...
@@ -77,6 +77,15 @@ describe Comment, :type => :model do
participations
=
Participation
.
where
(
target_id:
comment_alice
.
commentable_id
,
author_id:
comment_alice
.
author_id
)
expect
(
participations
.
count
).
to
eq
(
1
)
end
it
"does not create a participation if comment validation failed"
do
begin
alice
.
comment!
(
status_bob
,
" "
)
rescue
ActiveRecord
::
RecordInvalid
end
participations
=
Participation
.
where
(
target_id:
status_bob
,
author_id:
alice
.
person
.
id
)
expect
(
participations
.
count
).
to
eq
(
0
)
end
end
describe
"counter cache"
do
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter