Skip to content

Commit

Permalink
title
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoc committed Feb 27, 2012
1 parent 98b6c9b commit a8b3412
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/events_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module EventsHelper
def page_title
title = params[:event_type] || params[:sub_type]
title = title.eql?('educacion-continua') ? "Educaci&#243n Continua".html_safe : title.titleize
title = params[:event_type] || Event.subtype(params[:sub_type])
title = title.eql?('educacion-continua') ? "Educaci&#243n Continua".html_safe : title.titleize.html_safe
end

def localized_date date
Expand Down
17 changes: 17 additions & 0 deletions app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ class Event < ActiveRecord::Base

acts_as_gmappable check_process: false

def self.subtype sub_type
subtypes = {'asociacion-glaucoma' => 'Asociaci&#243n de Glaucoma de Occidente 2012',
'pediatrica' => 'Sociedad de Oftalmolog&#237a Pedi&#225trica y Estrabismo de Occidente 2012',
'oftalmologico' => 'Grupo Oftalmol#243ngico',
'oculoplastica' => 'Sociedad Cirugia Oculopl&#225stica Orbitaria',
'academico-retina' => 'Programa Acad&#233mico de la Asociaci#243n de Retina de Occidente 2012',
'glaucoma' => 'M#243dulo: Glaucoma',
'retina' => 'M#243dulo: Retina',
'oftalmologia' => 'M#243dulo: Oftalmolog&#237a Pedi&#225trica y Estrabismo',
'refraccion' => 'M#243dulo: Refracci#243n',
'neuro' => 'M#243dulo: Neuro Oftalmolog&#237a',
'cornea' => 'M#243dulo: C#243rnea y Catarata',
'tecnologia' => 'M#243dulo: Tecnolog&#237a de Punta'}
subtypes[sub_type]
end


def gmaps4rails_address
"#{self.google_map}"
end
Expand Down

0 comments on commit a8b3412

Please sign in to comment.