Add Eventserializer tests and fix undefined method `l' for Eventserializer

Solution of no method error pointed by @nishanthvijayan:
http://stackoverflow.com/a/11724935
This commit is contained in:
Aditya Prakash 2016-04-03 00:40:13 +05:30
parent a786321800
commit 0aa36b470e
2 changed files with 59 additions and 1 deletions

View file

@ -5,7 +5,7 @@ class EventSerializer < ActiveModel::Serializer
def date
t = object.start_time
t.blank? ? '' : %{ #{l t, format: :short}#{t.formatted_offset(false)} }
t.blank? ? '' : %{ #{I18n.l t, format: :short}#{t.formatted_offset(false)} }
end
def speaker_ids