The link between events and organisations is not based on a "tagified" orga's name.
Space, quote and asterisk are replaced with a dash. Colons are removed. Close #3
This commit is contained in:
parent
27901e6adf
commit
3387a38bda
@ -37,8 +37,8 @@ class OrgasController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
@search = Orga.search params[:q]
|
@search = Orga.search params[:q]
|
||||||
|
|
||||||
@events_future = Event.moderated.future.tag @orga.name
|
@events_future = Event.moderated.future.tag @orga.name_as_tag
|
||||||
@events_past = Event.moderated.past.tag @orga.name
|
@events_past = Event.moderated.past.tag @orga.name_as_tag
|
||||||
end
|
end
|
||||||
|
|
||||||
# PATCH/PUT /orgas/1
|
# PATCH/PUT /orgas/1
|
||||||
|
@ -45,4 +45,8 @@ class Orga < ActiveRecord::Base
|
|||||||
def send_secret
|
def send_secret
|
||||||
OrgaMailer.create(self).deliver_now!
|
OrgaMailer.create(self).deliver_now!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def name_as_tag
|
||||||
|
name.gsub(/[\s\*']/, '-').delete ':'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -96,5 +96,6 @@
|
|||||||
%dt= t '.past'
|
%dt= t '.past'
|
||||||
%dd= t '.count', count: @events_past.count
|
%dd= t '.count', count: @events_past.count
|
||||||
|
|
||||||
.events#map{ data: { url: maps_path(format: :json, tag: @orga.name,
|
.events#map{ title: @orga.name_as_tag,
|
||||||
|
data: { url: maps_path(format: :json, tag: @orga.name_as_tag,
|
||||||
future: false) } }
|
future: false) } }
|
||||||
|
Loading…
Reference in New Issue
Block a user