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