mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #904 from Shriyanshagro/master
Made use of Rails I18n data format in EventSerializer #598
This commit is contained in:
commit
6aedf2b03d
4 changed files with 14 additions and 1 deletions
3
Gemfile
3
Gemfile
|
|
@ -21,6 +21,9 @@ gem 'rails-observers'
|
|||
# for tracking data changes
|
||||
gem 'paper_trail'
|
||||
|
||||
# Internationalizing gem , use gem according to version of your rails application
|
||||
gem 'rails-i18n', '~> 4.0.0' # For 4.0.x
|
||||
|
||||
# as authentification framework
|
||||
gem 'devise'
|
||||
gem 'devise_ichain_authenticatable'
|
||||
|
|
|
|||
|
|
@ -357,6 +357,9 @@ GEM
|
|||
rails-deprecated_sanitizer (>= 1.0.1)
|
||||
rails-html-sanitizer (1.0.3)
|
||||
loofah (~> 2.0)
|
||||
rails-i18n (4.0.8)
|
||||
i18n (~> 0.7)
|
||||
railties (~> 4.0)
|
||||
rails-observers (0.1.2)
|
||||
activemodel (~> 4.0)
|
||||
railties (4.2.5.2)
|
||||
|
|
@ -558,6 +561,7 @@ DEPENDENCIES
|
|||
rails-assets-to-markdown!
|
||||
rails-assets-trianglify!
|
||||
rails-assets-waypoints!
|
||||
rails-i18n (~> 4.0.0)
|
||||
rails-observers
|
||||
rdoc-generator-fivefish
|
||||
redcarpet
|
||||
|
|
@ -579,3 +583,6 @@ DEPENDENCIES
|
|||
web-console (~> 2.0)
|
||||
webmock
|
||||
whenever
|
||||
|
||||
BUNDLED WITH
|
||||
1.11.2
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ class EventSerializer < ActiveModel::Serializer
|
|||
|
||||
def date
|
||||
t = object.start_time
|
||||
t.blank? ? '' : %{ #{t.time.strftime('%Y-%m-%dT%H:%M:%S')}#{t.formatted_offset(false)} }
|
||||
t.blank? ? '' : %{ #{l t, format: :short}#{t.formatted_offset(false)} }
|
||||
end
|
||||
|
||||
def speaker_ids
|
||||
|
|
|
|||
|
|
@ -3,3 +3,6 @@
|
|||
|
||||
en:
|
||||
hello: "Hello world"
|
||||
time:
|
||||
formats:
|
||||
short: "%Y-%m-%dT%H:%M:%S"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue