Les diff sont plus agréables à voir
This commit is contained in:
parent
d45530a56f
commit
6e47d45d21
2
Gemfile
2
Gemfile
@ -67,7 +67,7 @@ gem 'email_validator'
|
|||||||
# Email address obfuscation
|
# Email address obfuscation
|
||||||
gem 'actionview-encoded_mail_to'
|
gem 'actionview-encoded_mail_to'
|
||||||
# To display a patched diff for event descriptions
|
# To display a patched diff for event descriptions
|
||||||
gem 'differ'
|
gem 'diffy'
|
||||||
|
|
||||||
# A generic library to administrate the tool
|
# A generic library to administrate the tool
|
||||||
gem 'activeadmin', github: 'gregbell/active_admin'
|
gem 'activeadmin', github: 'gregbell/active_admin'
|
||||||
|
@ -101,7 +101,7 @@ GEM
|
|||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
devise-i18n (0.11.1)
|
devise-i18n (0.11.1)
|
||||||
differ (0.1.2)
|
diffy (3.0.6)
|
||||||
docile (1.1.5)
|
docile (1.1.5)
|
||||||
em-websocket (0.5.1)
|
em-websocket (0.5.1)
|
||||||
eventmachine (>= 0.12.9)
|
eventmachine (>= 0.12.9)
|
||||||
@ -329,7 +329,7 @@ DEPENDENCIES
|
|||||||
compass-rails
|
compass-rails
|
||||||
devise
|
devise
|
||||||
devise-i18n
|
devise-i18n
|
||||||
differ
|
diffy
|
||||||
email_validator
|
email_validator
|
||||||
font-awesome-rails
|
font-awesome-rails
|
||||||
geocoder
|
geocoder
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
require 'differ'
|
|
||||||
|
|
||||||
# Event management life cycle
|
# Event management life cycle
|
||||||
class ModerationsController < ApplicationController
|
class ModerationsController < ApplicationController
|
||||||
before_action :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
- prev = render file: '/events/show'
|
- prev = render file: '/events/show'
|
||||||
- @event = former
|
- @event = former
|
||||||
|
|
||||||
= raw Differ.diff new, prev
|
= raw Diffy::Diff.new new, prev
|
||||||
\
|
\
|
||||||
- if @current_user
|
- if @current_user
|
||||||
= edit_moderation_url @event
|
= edit_moderation_url @event
|
||||||
|
@ -27,7 +27,8 @@ hello world'
|
|||||||
assert_match(/Édition de l'événement .*/, mail.subject)
|
assert_match(/Édition de l'événement .*/, mail.subject)
|
||||||
assert_equal ['moderateurs@agendadulibre.org'], mail.to
|
assert_equal ['moderateurs@agendadulibre.org'], mail.to
|
||||||
assert_equal ['moderateurs@agendadulibre.org'], mail.from
|
assert_equal ['moderateurs@agendadulibre.org'], mail.from
|
||||||
assert_match(/^{/, mail.body.to_s)
|
assert_match(/^-/, mail.body.to_s)
|
||||||
|
assert_match(/^+/, mail.body.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
test 'accept' do
|
test 'accept' do
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
require 'differ'
|
|
||||||
|
|
||||||
# Preview all emails at http://localhost:3000/rails/mailers/moderation_mailer
|
# Preview all emails at http://localhost:3000/rails/mailers/moderation_mailer
|
||||||
class ModerationMailerPreview < ActionMailer::Preview
|
class ModerationMailerPreview < ActionMailer::Preview
|
||||||
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/create
|
# Preview this email at http://localhost:3000/rails/mailers/moderation_mailer/create
|
||||||
|
Loading…
Reference in New Issue
Block a user