diff --git a/app/controllers/moderations_controller.rb b/app/controllers/moderations_controller.rb index 4ad59fd7..2a78bc1d 100644 --- a/app/controllers/moderations_controller.rb +++ b/app/controllers/moderations_controller.rb @@ -21,7 +21,7 @@ class ModerationsController < ApplicationController @older_mod = Event.new @event.attributes respond_to do |format| if @moderation.update_attributes(moderation_params) && send_mails - format.html { redirect_to moderations_path, notice: t('.ok') } + format.html { redirect_to moderations_url, notice: t('.ok') } format.json { head :no_content } else format.html { render action: 'edit' } @@ -37,7 +37,7 @@ class ModerationsController < ApplicationController respond_to do |format| if @moderation.update(moderated: true) && send_accept_mails tweet - format.html { redirect_to moderations_path, notice: t('.ok') } + format.html { redirect_to moderations_url, notice: t('.ok') } format.json { head :no_content } else format.html { render action: 'edit' } diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index 28fbfc54..7195c59f 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -15,7 +15,7 @@ = month_calendar day_names: 'date.day_names', events: @events, previous_link: nil, next_link: nil, title: ->(start_date) { raw link_to l(start_date, format: :month), - root_url(start_date: start_date), class: 'month_selector' } do |date, events| + root_path(start_date: start_date), class: 'month_selector' } do |date, events| .day_number= date.day %ul.events.fa-ul - events.select { |e| (e.start_time.to_date..e.end_time.to_date).cover? date } @@ -32,7 +32,7 @@ - @events = @events.month params[:start_date].try :to_date = month_calendar day_names: 'date.day_names', events: @events, title: ->(start_date) { raw "#{I18n.t('date.month_names')[start_date.month]} #{link_to start_date.year, - root_url(year: start_date.year)}" }, + root_path(year: start_date.year)}" }, previous_link: ->(param, date_range) { link_to '<<', { param => (date_range.first - 1.day).beginning_of_month, tag: params[:tag], region: params[:region] } }, next_link: ->(param, date_range) { link_to '>>', @@ -51,11 +51,11 @@ .formats %em.fa.fa-rss =raw t '.calendar_in', - rss: link_to('RSS', events_url(:rss, + rss: link_to('RSS', events_path(:rss, tag: params[:tag], region: params[:region])), - webcal: link_to('webcal', events_url(:rss, + webcal: link_to('webcal', events_path(:rss, tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), - ical: link_to('iCal', events_url(:rss, + ical: link_to('iCal', events_path(:rss, tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) %a#banner(href='http://april.org/campagne') diff --git a/app/views/events/show.html.haml b/app/views/events/show.html.haml index 3b51c2b0..53f2c2f0 100644 --- a/app/views/events/show.html.haml +++ b/app/views/events/show.html.haml @@ -82,4 +82,4 @@ %p.tags %span.label= Event.human_attribute_name :tags - @event.tags.split.each do |tag| - = link_to tag, tag_url(tag) + = link_to tag, tag_path(tag) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d52314e1..3121a981 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -30,7 +30,7 @@ %li.map_suisse = link_to t('.suisse'), 'http://www.agendadulibre.ch' - %h1= link_to t('.title'), root_url + %h1= link_to t('.title'), root_path %h2=t '.subtitle' = render 'layouts/flash', flash: flash if flash.present? @@ -42,28 +42,28 @@ = link_to new_event_path do %em.fa.fa-pencil =t '.propose' - = link_to regions_url do + = link_to regions_path do %em.fa.fa-rss =t '.feeds' - = link_to maps_url do + = link_to maps_path do %em.fa.fa-map-marker =t '.map' - = link_to tags_url do + = link_to tags_path do %em.fa.fa-tags =t '.tags' - = link_to lugs_url do + = link_to lugs_path do %em.fa.fa-users = Lug.model_name.human.pluralize - = link_to application_infos_url do + = link_to application_infos_path do %em.fa.fa-info =t '.infos' - = link_to stats_regions_url do + = link_to stats_regions_path do %em.fa.fa-signal =t '.stats' - = link_to application_contact_url do + = link_to application_contact_path do %em.fa.fa-envelope =t '.contact' - = link_to moderations_url do + = link_to moderations_path do %em.fa.fa-gavel =t '.moderation' diff --git a/app/views/lugs/index.html.haml b/app/views/lugs/index.html.haml index 8e027766..9397560e 100644 --- a/app/views/lugs/index.html.haml +++ b/app/views/lugs/index.html.haml @@ -29,6 +29,6 @@ %td = link_to lug.url, lug.url %td - = link_to t('show'), lug_url(lug, q: params[:q], page: params[:page]), class: :view_link + = link_to t('show'), lug_path(lug, q: params[:q], page: params[:page]), class: :view_link = paginate @lugs diff --git a/app/views/lugs/show.html.haml b/app/views/lugs/show.html.haml index 0aea472a..6d5cfeea 100644 --- a/app/views/lugs/show.html.haml +++ b/app/views/lugs/show.html.haml @@ -11,23 +11,23 @@ %em.fa.fa-arrow-left = Lug.model_name.human.pluralize \/ - = link_to events_url tag: @lug.name do + = link_to events_path tag: @lug.name do %em.fa.fa-calendar Agenda \/ - = link_to events_url format: :rss, tag: @lug.name do + = link_to events_path format: :rss, tag: @lug.name do %em.fa.fa-rss RSS \/ - = link_to events_url format: :ics, tag: @lug.name do + = link_to events_path format: :ics, tag: @lug.name do %em.fa.fa-th-list iCal \/ - = link_to maps_url tag: @lug.name do + = link_to maps_path tag: @lug.name do %em.fa.fa-map-marker OpenStreetMap \/ - = link_to maps_url format: :json, tag: @lug.name do + = link_to maps_path format: :json, tag: @lug.name do %em.fa.fa-dot-circle-o GeoJSON diff --git a/app/views/maps/index.html.haml b/app/views/maps/index.html.haml index f17e0b42..bff3f15e 100644 --- a/app/views/maps/index.html.haml +++ b/app/views/maps/index.html.haml @@ -5,14 +5,14 @@ #map.events(data-url="#{maps_path format: :json}") %nav - = link_to events_url format: :rss, tag: params[:tag] do + = link_to events_path format: :rss, tag: params[:tag] do %em.fa.fa-rss RSS \/ - = link_to events_url format: :ics, tag: params[:tag] do + = link_to events_path format: :ics, tag: params[:tag] do %em.fa.fa-th-list iCal \/ - = link_to maps_url format: :json, tag: params[:tag] do + = link_to maps_path format: :json, tag: params[:tag] do %em.fa.fa-dot-circle-o GeoJSON diff --git a/app/views/moderations/refuse.html.haml b/app/views/moderations/refuse.html.haml index 92c48143..db6c9934 100644 --- a/app/views/moderations/refuse.html.haml +++ b/app/views/moderations/refuse.html.haml @@ -23,7 +23,7 @@ = label_tag :reason_text, t('.reason') = text_area_tag :reason_text, nil, cols: 40, rows: 5 - = link_to moderations_url do + = link_to moderations_path do %em.fa.fa-arrow-left =t '.ko' diff --git a/app/views/moderations/validate.html.haml b/app/views/moderations/validate.html.haml index 57cd7678..4313001f 100644 --- a/app/views/moderations/validate.html.haml +++ b/app/views/moderations/validate.html.haml @@ -6,7 +6,7 @@ %h2.warning=t '.warning' = form_for @moderation, url: { action: :accept }, html: { method: :put } do |f| - = link_to moderations_url do + = link_to moderations_path do %em.fa.fa-arrow-left =t '.ko' @@ -22,7 +22,7 @@ %h3=t '.tweet_helper' - = @event.to_tweet event_url @event + = @event.to_tweet event_path @event %fieldset %legend diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml index bb9b6bcd..bf84fdde 100644 --- a/app/views/notes/_form.html.haml +++ b/app/views/notes/_form.html.haml @@ -20,12 +20,12 @@ :markdown #{t 'edit_link', scope: [:note_mailer, :notify]} - #{edit_moderation_url @note.event} + #{edit_moderation_path @note.event} #{t 'signature', scope: [:note_mailer, :notify]} .actions - = link_to moderations_url do + = link_to moderations_path do %em.fa.fa-arrow-left =t '.ko' = f.button do @@ -34,7 +34,7 @@ - else .actions - = link_to moderations_url do + = link_to moderations_path do %em.fa.fa-arrow-left =t '.ko' = f.button do diff --git a/app/views/regions/stats.html.haml b/app/views/regions/stats.html.haml index a5d0a21b..cca611d2 100644 --- a/app/views/regions/stats.html.haml +++ b/app/views/regions/stats.html.haml @@ -26,7 +26,7 @@ - @year_events.each do |year| %td.quantity - line = @month_events.find { |line| line[0][0] == year[0] && line[0][1].try(:to_i) == m } - = link_to root_url(start_date: "#{year[0]}-#{m}-01") do + = link_to root_path(start_date: "#{year[0]}-#{m}-01") do = number_with_delimiter line[1] if line %td.sparkline/ @@ -47,7 +47,7 @@ %dl - @region_events.each do |region| %dt.item - = link_to root_url region: Region.find_by_name(region[0]).id do + = link_to root_path region: Region.find_by_name(region[0]).id do = region[0] %dd.quantity= number_with_delimiter region[1] diff --git a/app/views/tags/index.html.haml b/app/views/tags/index.html.haml index 1bbda8ad..475f455c 100644 --- a/app/views/tags/index.html.haml +++ b/app/views/tags/index.html.haml @@ -4,6 +4,6 @@ - @tags.each do |tag| %span.tag(class="size_#{Math.log2(tag[1]).to_i}") - = link_to tag[0], tag_url(tag[0]) + = link_to tag[0], tag_path(tag[0]) %p=t '.limited' diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index 3166aaab..957b75d5 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -9,23 +9,23 @@ %em.fa.fa-arrow-left = Event.human_attribute_name(:tag).pluralize \/ - = link_to events_url tag: params[:id] do + = link_to events_path tag: params[:id] do %em.fa.fa-calendar Agenda \/ - = link_to events_url format: :rss, tag: params[:id] do + = link_to events_path format: :rss, tag: params[:id] do %em.fa.fa-rss RSS \/ - = link_to events_url format: :ics, tag: params[:id] do + = link_to events_path format: :ics, tag: params[:id] do %em.fa.fa-th-list iCal \/ - = link_to maps_url tag: params[:id] do + = link_to maps_path tag: params[:id] do %em.fa.fa-map-marker OpenStreetMap \/ - = link_to maps_url format: :json, tag: params[:id] do + = link_to maps_path format: :json, tag: params[:id] do %em.fa.fa-dot-circle-o GeoJSON