Proposer un événement est fonctionnel

This commit is contained in:
echarp 2014-01-01 21:26:35 +01:00
parent 34f9e33fa5
commit ea6694837b
18 changed files with 361 additions and 201 deletions

View File

@ -52,6 +52,7 @@ gem 'font-awesome-rails'
gem 'compass-rails', "~> 2.0.alpha.0" gem 'compass-rails', "~> 2.0.alpha.0"
gem 'has_scope' gem 'has_scope'
gem 'simple_calendar', github: 'echarp/simple_calendar' gem 'simple_calendar', github: 'echarp/simple_calendar'
gem 'redcarpet'
group :development do group :development do
gem 'guard-livereload' gem 'guard-livereload'

View File

@ -7,7 +7,7 @@ GIT
GIT GIT
remote: git://github.com/gregbell/active_admin.git remote: git://github.com/gregbell/active_admin.git
revision: 5e4fe269a32e491d8454ed586a5321a6cfc088cd revision: 0f333d3a0236de1b13e1cd8cda35f1406c0ceba8
specs: specs:
activeadmin (1.0.0.pre) activeadmin (1.0.0.pre)
arbre (~> 1.0) arbre (~> 1.0)
@ -188,11 +188,12 @@ GEM
actionpack (>= 3.0) actionpack (>= 3.0)
activerecord (>= 3.0) activerecord (>= 3.0)
polyamorous (~> 0.6.0) polyamorous (~> 0.6.0)
rb-fsevent (0.9.3) rb-fsevent (0.9.4)
rb-inotify (0.9.3) rb-inotify (0.9.3)
ffi (>= 0.5.0) ffi (>= 0.5.0)
rdoc (3.12.2) rdoc (3.12.2)
json (~> 1.4) json (~> 1.4)
redcarpet (3.0.0)
responders (1.0.0) responders (1.0.0)
railties (>= 3.2, < 5) railties (>= 3.2, < 5)
sass (3.2.13) sass (3.2.13)
@ -250,6 +251,7 @@ DEPENDENCIES
mysql2 mysql2
rails rails
rails-i18n rails-i18n
redcarpet
sass-rails sass-rails
sdoc sdoc
simple_calendar! simple_calendar!

View File

@ -25,3 +25,5 @@ guard :minitest do
watch(%r{^test/.+_test\.rb}) watch(%r{^test/.+_test\.rb})
watch(%r{^test/test_helper\.rb}) { 'test' } watch(%r{^test/test_helper\.rb}) { 'test' }
end end
notification :notifysend

View File

@ -43,22 +43,22 @@ header.top
letter-spacing: 2px letter-spacing: 2px
h2 h2
font-size: 0.8em font-size: 0.8em
margin-top: 12px margin-top: 0.9em
font-style: italic font-style: italic
font-weight: normal font-weight: normal
padding-bottom: 5px padding-bottom: 5px
ul.countries ul.countries
top: -8px top: -8px
right: 0.6em right: 0.5em
position: absolute position: absolute
font-size: 0.7em font-size: 0.7em
list-style-type: none list-style-type: none
li li
text-align: left text-align: left
line-height: 1.2em line-height: 1.3em
img img
margin-right: 0.6em margin-right: 0.65em
vertical-align: middle vertical-align: middle
main main
@ -78,12 +78,14 @@ main
margin-left: 2em margin-left: 2em
line-height: 1.3em line-height: 1.3em
p p
margin: 0.9em 0 margin: 0.95em 0
line-height: 1.3em line-height: 1.3em
text-align: justify text-align: justify
hr
margin: 10px 20px
footer.bottom nav footer.bottom nav
margin: 29px auto -3px margin: 18px auto -3px
font-size: smaller font-size: smaller
a + a:before a + a:before
color: black color: black

View File

@ -1,27 +1,28 @@
@import "compass" @import "compass"
form.region_selector form.region_selector
width: 98.4% width: 98%
position: absolute position: absolute
margin-top: 2.6em margin-top: 2.6em
label label
display: none display: none
main form.region_selector + h2 main form.region_selector + h2
width: 100%
margin-top: 1.1em margin-top: 1.1em
margin-bottom: 2.5em margin-bottom: 2.32em
a a
font-weight: normal font-weight: normal
&.previous-month &.previous-month
margin-right: 0.33em margin-right: 8px
&.next-month &.next-month
margin-left: 0.33em margin-left: 8px
// For whole year calendar // For whole year calendar
main form.region_selector + h2 + h2 main form.region_selector + h2 + h2
padding: 1px 0 0 padding: 6px 0 0
font-size: 1.2em font-size: 1.2em
margin-bottom: 19px margin-bottom: 0.8em
table.calendar + h2 table.calendar + h2
margin: 1em margin: 1em
@ -32,59 +33,71 @@ table.calendar
margin: 0 auto margin: 0 auto
padding: 0 padding: 0
border-spacing: 2px border-spacing: 2px
th tr
padding: 0 0 5px 0 th
text-transform: capitalize padding-bottom: 0.35em
td text-transform: capitalize
width: 14% !important td
height: 4.8em width: 14% !important
border: 1px solid #89B7E5 height: 4.8em
vertical-align: top border: 1px solid #89B7E5
background-color: #A1C3E7 vertical-align: top
&.not-current-month background-color: #A1C3E7
border: none &.today
background-color: #ededed border: 1px solid #FFB578
li background-color: #ffe0c7
color: #555 .day_number
.event color: #544f32
a:link, a:visited font-size: 0.8em
color: #888 margin-top: -1px
&.today &.future
border: 1px solid #FFB578 border-color: rgb(150, 207, 255)
background-color: #ffe0c7 background-color: #C6E5FF
.day_number
font-size: 0.8em
margin-top: -1px
&.not-current-month
border: none
background-color: #ededed
li
color: #555
.event
a:link, a:visited
color: #888
.day_number .day_number
color: #544f32 float: left
font-size: 0.8em color: #727070
margin: 0 1px 3px 1px
font-size: 0.6em
font-weight: bolder
line-height: 1.2em
letter-spacing: 2px
&:hover .day_number
color: black
.day_number ul
float: left clear: left
color: #727070 margin-left: 0
margin: 0 1px 3px 1px padding-left: 15px
font-size: 0.6em list-style-type: circle
font-weight: bolder li
line-height: 1.2em color: #444
letter-spacing: 2px margin: 0
ul padding: 0
clear: left margin-bottom: 5px
margin-left: 0
padding-left: 15px
list-style-type: circle
li
color: #444
padding: 0
margin-bottom: 5px
.event .event
font-size: smaller font-size: smaller
line-height: 1.1em line-height: 1.1em
strong:after strong:after
content: ':' content: ':'
margin-right: -1px margin-right: -1px
a:link, a:visited a:link, a:visited
color: #666 color: #666
font-weight: normal font-weight: normal
&:hover &:hover
color: black color: black
.formats .formats
width: 90% width: 90%
@ -114,3 +127,41 @@ table.calendar
li li
margin-left: 2em margin-left: 2em
line-height: 1.3em line-height: 1.3em
#advises
border: 1px solid #FFB578
margin: 10px 100px 20px 100px
text-align: left
padding-left: 10px
padding-right: 10px
background-color: #ffe0c7
h1
font-size: 1.9em
text-align: center
font-weight: normal
a
color: #8F4900
form
.field, .actions
text-align: left
margin-left: 2px
margin-bottom: 2px !important
*
vertical-align: middle
p.helper
margin: 1px 5px 1px 6.6em
line-height: 0.9em
label
width: 6.3em
display: inline-block
&:after
content: ':'
input, textarea, select
margin: 3px 0
border: 1px solid #868686
&:focus
background-color: #F0F8FF
.actions
margin-left: 6.75em
margin-bottom: 10px

View File

@ -1,69 +0,0 @@
body {
background-color: #fff;
color: #333;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}
p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}
pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}
a {
color: #000;
&:visited {
color: #666;
}
&:hover {
color: #fff;
background-color: #000;
}
}
div {
&.field, &.actions {
margin-bottom: 10px;
}
}
#notice {
color: green;
}
.field_with_errors {
padding: 2px;
background-color: red;
display: table;
}
#error_explanation {
width: 450px;
border: 2px solid red;
padding: 7px;
padding-bottom: 0;
margin-bottom: 20px;
background-color: #f0f0f0;
h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
margin-bottom: 0px;
background-color: #c00;
color: #fff;
}
ul li {
font-size: 12px;
list-style: square;
}
}

View File

@ -1,4 +1,6 @@
class EventsController < InheritedResources::Base class EventsController < InheritedResources::Base
before_action :set_event, only: [:show, :edit, :update, :destroy]
def index def index
respond_to do |format| respond_to do |format|
format.html { format.html {
@ -28,8 +30,58 @@ class EventsController < InheritedResources::Base
end end
end end
# POST /events
# POST /events.json
def create
@event = Event.new(event_params)
# This is a special case, required to handle the region attribute with same foreign key name
@event.region = Region.find(params[:event][:region])
if (params[:visu])
logger.info 'XXXXXXXXXXXXXXX'
render action: 'new'
return
end
respond_to do |format|
if @event.save
format.html { redirect_to @event, notice: 'Event was successfully created.' }
format.json { render action: 'show', status: :created, location: @event }
else
format.html { render action: 'new' }
format.json { render json: @event.errors, status: :unprocessable_entity }
end
end
end
# PATCH/PUT /events/1
# PATCH/PUT /events/1.json
def update
respond_to do |format|
# This is a special case, required to handle the region attribute with same foreign key name
@event.region = Region.find(params[:event][:region])
if @event.update(event_params)
format.html { redirect_to @event, notice: 'Event was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: 'edit' }
format.json { render json: @event.errors, status: :unprocessable_entity }
end
end
end
private private
def permitted_params def permitted_params
params.permit city: [:name, :majname, :postalcode, :inseecode, :regioncode, :latitude, :longitude] params.permit event: [:title, :start_time, :end_time, :description, :city, :locality, :url, :contact, :submitter, :tags]
end end
# Use callbacks to share common setup or constraints between actions.
def set_event
@event = Event.find(params[:id])
end
# Never trust parameters from the scary internet, only allow the white list through.
def event_params
params.require(:event).permit(:title, :start_time, :end_time, :description, :city, :locality, :url, :contact, :submitter, :tags)
end
end end

View File

@ -1,6 +1,10 @@
class Event < ActiveRecord::Base class Event < ActiveRecord::Base
belongs_to :region, foreign_key: 'region' belongs_to :region, foreign_key: 'region'
validates_presence_of :region
default_scope { where moderated: 1 }
scope :year, -> year { scope :year, -> year {
where "end_time >= ? and start_time < ?", where "end_time >= ? and start_time < ?",
"#{year}-1-1", "#{year.to_i+1}-1-1" "#{year}-1-1", "#{year.to_i+1}-1-1"
@ -12,6 +16,12 @@ class Event < ActiveRecord::Base
scope :region, -> region { where region: region } scope :region, -> region { where region: region }
scope :tag, -> tag { where "tags like ?", "%#{tag}%" } scope :tag, -> tag { where "tags like ?", "%#{tag}%" }
before_validation(on: :create) do
self.submission_time = Date.today
self.decision_time = Date.today
end
def same_day? def same_day?
start_time.to_date == end_time.to_date start_time.to_date == end_time.to_date
end end

View File

@ -1,3 +1,8 @@
- if @event && params[:visu]
%hr/
= render file: '/events/show'
%hr/
= form_for @event do |f| = form_for @event do |f|
- if @event.errors.any? - if @event.errors.any?
#error_explanation #error_explanation
@ -6,59 +11,91 @@
- @event.errors.full_messages.each do |msg| - @event.errors.full_messages.each do |msg|
%li= msg %li= msg
:markdown
Cette page permet de soumettre un évènement dans l'Agenda du Libre. Celui-ci n'apparaîtra pas automatiquement dans l'Agenda, il sera tout d'abord validé par un modérateur. Un courrier électronique vous sera envoyé à l'adresse e-mail de contact donnée ci-dessous lorsque l'évènement aura été modéré.
#advises
%h1 Recommandations importantes
:markdown
Ces quelques recommandations vous permettront de proposer un évènement qui sera validé plus rapidement, et dont la lisibilité sera meilleure pour les utilisateurs de l'Agenda du Libre.
* L'évènement doit concerner le **Logiciel Libre**. L'agenda n'a pas vocation à publier d'autres types d'évènements.
* Le texte des évènements doit être rédigé en français, en **évitant les fautes de grammaire et d'orthographe**.
* Donnez une description **rédigée** de l'évènement, avec des phrases, plutôt qu'un style télégraphique.
* Commencez la description de votre évènement par une phrase reprenant les informations principales, telle que : _« L'association [Zorglub](http://www.asso-zorglub.org) organise une conférence sur le thème des **modèles économiques du Logiciel Libre** le samedi 21 mars de 18h à 20h à la médiathèque Champillion de Montpellier. »_
* Pensez que le lecteur peut ne pas connaître votre association, le logiciel dont il sera question, etc., donc donnez à chaque fois toutes les informations nécessaires. Rappelez **le principe de l'évènement, le public visé, le lieu exact, la date, l'heure**, même si il est régulier (repas, rencontre régulière, etc.) et que vous avez déjà soumis un évènement du même type dans l'Agenda.
* **Égayez au maximum la description** de votre évènement: lien vers le site de votre association, vers le logiciel ou le langage dont il sera question, vers les organismes partenaires, etc. Pour cela, utilisez les balises HTML pour mettre en gras, en italique, faire des paragraphes et des liens.
* Ne mettez pas l'intégralité des mots en majuscule, que ce soit dans le titre, le nom de la ville ou la description.
* Donnez l'**adresse directe** d'un site Web donnant plus d'informations sur l'évènement. Si l'adresse est la page d'accueil du site de votre organisation, veillez à ce que l'évènement soit clairement visible, et que le lecteur n'ait pas à chercher trop longtemps avant de trouver l'information qu'il cherche.
* La description de l'évènement ne doit pas ressembler à une publicité éhontée pour votre entreprise, projet ou logiciel. Le ton d'un communiqué de presse, par exemple, ne convient pas pour l'Agenda du Libre.
* Les évènements de type professionnel sont acceptés dès lors qu'ils sont accessibles et ouverts à tous. Les évènements payants sont acceptés si le prix de l'entrée ne réserve pas l'évènement à un public uniquement professionnel.
L'équipe de modération se réserve le droit de modifier la description de l'évènement pour la rendre plus complète, plus lisible ou plus attrayante.
Si vous soumettez souvent un évènement régulier dans l'Agenda du Libre, vous pouvez automatiser cette procédure à l'aide d'un [script que nous vous proposons](http://agendadulibre.org/submit-script-doc.php).
.field .field
%p.helper
%strong Décrivez en moins de 5 mots votre évènement, sans y indiquer le lieu, la ville ou la date.
= f.label :title = f.label :title
= f.text_field :title = f.text_field :title, size: 70
.field .field
= f.label :description = f.label Event.human_attribute_name :start_time
= f.text_area :description
.field
= f.label :start_time
= f.datetime_select :start_time = f.datetime_select :start_time
.field .field
= f.label :end_time = f.label Event.human_attribute_name :end_time
= f.datetime_select :end_time = f.datetime_select :end_time
.field .field
= f.label :city %p.helper
= f.text_field :city %strong Décrivez de la manière la plus complète possible votre évènement.
%p.helper
%em
:escaped
Les balises HTML autorisées sont <p>, <b>, <i>, <ul>, <ol>, <li>, <br/>, <a>. Merci d'utiliser ces balises pour formater la description de votre évènement.
%p.helper
%em
:escaped
Veillez à utiliser les balises <p> pour formater les paragraphes, et non la balise <br/>.
= f.label Event.human_attribute_name :description
= f.text_area :description, rows: 29, cols: 80
.field .field
= f.label :region = f.label Event.human_attribute_name :city
= f.text_field :region = f.text_field :city, size: 70
.field .field
= f.label :locality = f.label Event.human_attribute_name :region
= f.number_field :locality = f.select :region,
options_from_collection_for_select(Region.all, 'id', 'name', params[:region])
.field .field
= f.label :url = f.label Event.human_attribute_name :locality
= f.text_field :url = f.select :locality,
options_for_select([[t('attributes.locality_0'), 0], [t('attributes.locality_1'), 1]], params[:locality])
.field .field
= f.label :contact %p.helper
= f.text_field :contact %em
Lien
%strong direct
vers une page donnant plus d'informations sur l'évènement (lieu précis, horaire précis, programme précis...)
= f.label Event.human_attribute_name :url
= f.text_field :url, size: 70
.field .field
= f.label :contact %p.helper
= f.text_field :contact %em Adresse e-mail de contact. Elle sera affichée de manière peu compréhensible par les spammeurs.
= f.label Event.human_attribute_name :contact
= f.text_field :contact, size: 70
.field .field
%p.helper
%em Adresse e-mail du soumetteur de l'évènement. Elle ne sera utilisée que par les modérateurs pour contacter la personne ayant proposé l'évènement, pour lui informer de sa validation ou de son rejet. Si cette adresse n'est pas présente, l'adresse de contact sera utilisée
= f.label :submitter = f.label :submitter
= f.text_field :submitter = f.text_field :submitter, size: 70
.field
= f.label :moderated
= f.number_field :moderated
.field .field
%p.helper
%em Tags pour l'évènement. Les tags sont séparés par des espaces. Un tag ne peut contenir que des lettres minuscules, des chiffres et des tirets.
%p.helper Dans les tags, indiquez le nom de la ou des associations organisatrices. N'indiquez pas le nom de la ville ou de la région.
= f.label :tags = f.label :tags
= f.text_field :tags = f.text_field :tags, size: 70
.field
= f.label :secret
= f.text_field :secret
.field
= f.label :decision_time
= f.datetime_select :decision_time
.field
= f.label :submission_time
= f.datetime_select :submission_time
.field
= f.label :moderator_mail_id
= f.text_field :moderator_mail_id
.field
= f.label :submitter_mail_id
= f.text_field :submitter_mail_id
.actions .actions
= f.submit 'Save' = f.submit t('.visualise'), name: :visu
= f.submit t('.save')

View File

@ -1,7 +1,5 @@
%h1 Editing event %h2=t '.title'
= render 'form' = render 'form'
= link_to 'Show', @event = link_to 'Show', @event
\|
= link_to 'Back', events_path

View File

@ -1,5 +1,3 @@
%h1 New event %h2=t '.title'
= render 'form' = render 'form'
= link_to 'Back', events_path

View File

@ -1,15 +1,17 @@
%p#notice= notice %p#notice= notice
#lug-list - if @event.id
%h1=t '.lug-list' #lug-list
%ul %h1=t '.lug-list'
- @event.region.lugs.order(department: :asc).each do |lug| - if @event.region
%li %ul
= link_to lug.name, lug.url - @event.region.lugs.order(department: :asc).each do |lug|
(#{lug.department}) %li
= link_to lug.name, lug.url
(#{lug.department})
%h1 Actions %h1 Actions
= link_to t('.add_to_calendar'), root_url = link_to t('.add_to_calendar'), root_url
%h2 %h2
%em %em
@ -23,7 +25,7 @@
%p %p
- if @event.same_day? - if @event.same_day?
Le #{l @event.start_time.to_date, format: :long}, Le #{l @event.start_time.to_date, format: :long},
de #{l @event.start_time, format: :hours} à #{l @event.end_time, format: :hours}.</p> de #{l @event.start_time, format: :hours} à #{l @event.end_time, format: :hours}.
- else - else
Du Du
=l @event.start_time, format: :at =l @event.start_time, format: :at
@ -34,7 +36,7 @@
À À
%em %em
= link_to(@event.city, "http://fr.wikipedia.org/wiki/#{@event.city}") + ',' = link_to(@event.city, "http://fr.wikipedia.org/wiki/#{@event.city}") + ','
= link_to @event.region.name, "http://fr.wikipedia.org/wiki/#{@event.region.name}" = link_to @event.region.name, "http://fr.wikipedia.org/wiki/#{@event.region.name}" rescue nil
%h3 Description %h3 Description
=raw @event.description =raw @event.description

View File

@ -4,4 +4,4 @@
# Mime::Type.register "text/richtext", :rtf # Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone # Mime::Type.register_alias "text/html", :iphone
Mime::Type.register "text/xml", :rss #Mime::Type.register "text/xml", :rss

View File

@ -44,3 +44,7 @@ en:
password: Password password: Password
lastname: Name lastname: Name
firstname: First name firstname: First name
time:
formats:
at: "%A %d %B %Y at %Hh%M"
hours: "%Hh%M"

View File

@ -8,6 +8,8 @@ fr:
id: ID id: ID
name: Nom name: Nom
email: Email email: Email
locality_0: Locale
locality_1: Nationale
created_at: Créé le created_at: Créé le
updated_at: Modifié le updated_at: Modifié le
created: Créé il y a %{date} created: Créé il y a %{date}
@ -37,11 +39,24 @@ fr:
department: Département department: Département
url: Adresse web url: Adresse web
city: Cité city: Cité
event:
title: Titre
start_time: Début
end_time: Fin
description: Description
city: Ville
region: Région
locality: Portée
url: URL
contact: Contact
submitter: Soumetteur
helpers: helpers:
submit: submit:
create: "Créer %{model}" create: "Créer %{model}"
update: "Mettre à jour %{model}" update: "Mettre à jour %{model}"
event:
create: Visualiser
date: date:
abbr_day_names: abbr_day_names:
@ -80,3 +95,10 @@ fr:
show: show:
lug-list: Groupes d'utilisateurs de la région lug-list: Groupes d'utilisateurs de la région
add_to_calendar: Ajouter à mon calendrier add_to_calendar: Ajouter à mon calendrier
new:
title: Soumettre un évènement
edit:
title: Éditer un évènement
form:
save: Valider
visualise: Visualiser

View File

@ -16,9 +16,43 @@ class EventsControllerTest < ActionController::TestCase
assert_response :success assert_response :success
end end
test "should preview event" do
assert_no_difference('Event.count') do
post :create, visu: 'visualise', event: {
title: @event.title,
start_time: @event.start_time,
end_time: @event.end_time,
description: @event.description,
city: @event.city,
region: regions(:region_one),
locality: @event.locality,
url: @event.url,
contact: @event.contact,
submitter: @event.submitter,
submitter_mail_id: @event.submitter_mail_id,
tags: @event.tags
}
end
assert_response :success
end
test "should create event" do test "should create event" do
assert_difference('Event.count') do assert_difference('Event.count') do
post :create, event: { city: @event.city, contact: @event.contact, contact: @event.contact, decision_time: @event.decision_time, description: @event.description, end_time: @event.end_time, locality: @event.locality, moderated: @event.moderated, moderator_mail_id: @event.moderator_mail_id, region_id: @event.region_id, secret: @event.secret, start_time: @event.start_time, submission_time: @event.submission_time, submitter: @event.submitter, submitter_mail_id: @event.submitter_mail_id, tags: @event.tags, title: @event.title, url: @event.url } post :create, event: {
title: @event.title,
start_time: @event.start_time,
end_time: @event.end_time,
description: @event.description,
city: @event.city,
region: regions(:region_one),
locality: @event.locality,
url: @event.url,
contact: @event.contact,
submitter: @event.submitter,
submitter_mail_id: @event.submitter_mail_id,
tags: @event.tags
}
end end
assert_redirected_to event_path(assigns(:event)) assert_redirected_to event_path(assigns(:event))
@ -35,7 +69,23 @@ class EventsControllerTest < ActionController::TestCase
end end
test "should update event" do test "should update event" do
patch :update, id: @event, event: { city: @event.city, contact: @event.contact, contact: @event.contact, decision_time: @event.decision_time, description: @event.description, end_time: @event.end_time, locality: @event.locality, moderated: @event.moderated, moderator_mail_id: @event.moderator_mail_id, region_id: @event.region_id, secret: @event.secret, start_time: @event.start_time, submission_time: @event.submission_time, submitter: @event.submitter, submitter_mail_id: @event.submitter_mail_id, tags: @event.tags, title: @event.title, url: @event.url } patch :update, id: @event, event: {
title: @event.title,
start_time: @event.start_time,
end_time: @event.end_time,
description: @event.description,
city: @event.city,
region: regions(:region_one),
locality: @event.locality,
url: @event.url,
contact: @event.contact,
moderated: @event.moderated,
moderator_mail_id: @event.moderator_mail_id,
secret: @event.secret,
submission_time: @event.submission_time,
submitter: @event.submitter,
submitter_mail_id: @event.submitter_mail_id,
tags: @event.tags }
assert_redirected_to event_path(assigns(:event)) assert_redirected_to event_path(assigns(:event))
end end

View File

@ -6,11 +6,10 @@ one:
start_time: 2013-12-28 16:04:56 start_time: 2013-12-28 16:04:56
end_time: 2013-12-28 16:04:56 end_time: 2013-12-28 16:04:56
city: MyString city: MyString
region_id: region: region_one
locality: 1 locality: 1
url: MyString url: MyString
contact: MyString contact: MyString
contact: MyString
submitter: MyString submitter: MyString
moderated: 1 moderated: 1
tags: MyString tags: MyString
@ -26,11 +25,10 @@ two:
start_time: 2013-12-28 16:04:56 start_time: 2013-12-28 16:04:56
end_time: 2013-12-28 16:04:56 end_time: 2013-12-28 16:04:56
city: MyString city: MyString
region_id: region: region_one
locality: 1 locality: 1
url: MyString url: MyString
contact: MyString contact: MyString
contact: MyString
submitter: MyString submitter: MyString
moderated: 1 moderated: 1
tags: MyString tags: MyString

View File

@ -1,7 +1,7 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
region_one: region_one:
name: MyString name: Alsace
region_two: region_two:
name: MyString name: Aquitaine