diff --git a/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee index 268a13cae..7e49d6792 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/activity_stream.js.coffee @@ -44,10 +44,11 @@ class App.DashboardActivityStream extends App.Controller items = @prepareForObjectList(items) - html = $('
') + html = $('') for item in items html.append( @renderItem(item) ) + @$('.activity-entries').remove() @el.append html # update time diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index 02b1f3edc..6f9cbe8f6 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -1410,7 +1410,7 @@ class searchableSelectRef extends App.ControllerContent name: 'project-name' id: 'project-name-123' placeholder: 'Enter Project Name' - options: [{"value":0,"name":"Appleasdfasdfasdjflkajhsdlfkjahsdlfkjahsdlkfjahsdlkfjahsldkfjahsldkjfahsldkjfh asdf lkajshdfl kajshdfl kajhsdflk ajhsdlfk jahsdlfk jahsdlfk jahsdlkfj ahsdlkfj ahsldkjfahskdjfh aslkdjfhal skdjfha lksdjfhalksdjhfal ksjdal kjsdhfakl sjdhafl jsdhf laskdjhfal ksjdhfal ksdjhfal kjsdhal kjsdhfl akjsdhf lhkj"},{"value":1,"name":"Microsoft","selected":true},{"value":2,"name":"Google"},{"value":3,"name":"Deutsche Bahn"},{"value":4,"name":"Sparkasse"},{"value":5,"name":"Deutsche & Post"},{"value":6,"name":"Mitfahrzentrale"},{"value":7,"name":"Starbucks"},{"value":8,"name":"Mac Donalds"},{"value":9,"name":"Flixbus"},{"value":10,"name":"Betahaus"},{"value":11,"name":"Bruno Banani"},{"value":12,"name":"Alpina"},{"value":13,"name":"Samsung"},{"value":14,"name":"ChariTea"},{"value":15,"name":"fritz-kola"},{"value":16,"name":"Vitamin Water"},{"value":17,"name":"Znuny"}] + options: [{"value":0,"name":"Appleasdfasdfasdjflkajhsdlfkjahsdlfkjahsdlkfjahsdlkfjahsldkfjahsldkjfahsldkjfh asdf lkajshdfl kajshdfl kajhsdflk ajhsdlfk jahsdlfk jahsdlfk jahsdlkfj ahsdlkfj ahsldkjfahskdjfh aslkdjfhal skdjfha lksdjfhalksdjhfal ksjdal kjsdhfakl sjdhafl jsdhf laskdjhfal ksjdhfal ksdjhfal kjsdhal kjsdhfl akjsdhf lhkj"},{"value":1,"name":"Microsoft","selected":true},{"value":2,"name":"Google"},{"value":3,"name":"Deutsche Bahn"},{"value":4,"name":"Sparkasse"},{"value":5,"name":"Deutsche Post"},{"value":6,"name":"Mitfahrzentrale"},{"value":7,"name":"Starbucks"},{"value":8,"name":"Mac Donalds"},{"value":9,"name":"Flixbus"},{"value":10,"name":"Betahaus"},{"value":11,"name":"Bruno Banani"},{"value":12,"name":"Alpina"},{"value":13,"name":"Samsung"},{"value":14,"name":"ChariTea"},{"value":15,"name":"fritz-kola"},{"value":16,"name":"Vitamin Water"},{"value":17,"name":"Znuny"},{"value":18,"name":"Max & Moritz"}] @html App.view('layout_ref/search_select') diff --git a/app/assets/javascripts/app/views/layout_ref/search_select.jst.eco b/app/assets/javascripts/app/views/layout_ref/search_select.jst.eco index af51c26bf..26bca66c3 100644 --- a/app/assets/javascripts/app/views/layout_ref/search_select.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/search_select.jst.eco @@ -23,6 +23,7 @@ + diff --git a/lib/cache.rb b/lib/cache.rb index d4b0aad02..617eaea52 100644 --- a/lib/cache.rb +++ b/lib/cache.rb @@ -4,7 +4,7 @@ module Cache delete a cache - Cache.delete( 'some_key' ) + Cache.delete('some_key') =end @@ -18,9 +18,9 @@ write a cache Cache.write( 'some_key', - { :some => { :data => { 'structure' } } }, + { some: { data: { 'structure' } } }, { - :expires_in => 24.hours, # optional + :expires_in => 24.hours, # optional, default 7 days } ) @@ -28,10 +28,10 @@ write a cache def self.write( key, data, params = {} ) if !params[:expires_in] - params[:expires_in] = 24.hours + params[:expires_in] = 7.days end begin - Rails.cache.write( key.to_s, data, params) + Rails.cache.write(key.to_s, data, params) rescue => e Rails.logger.error "NOTICE: #{e.message}" end @@ -41,12 +41,12 @@ write a cache get a cache - value = Cache.write( 'some_key' ) + value = Cache.write('some_key') =end def self.get( key ) - Rails.cache.read( key.to_s ) + Rails.cache.read(key.to_s) end =begin @@ -59,7 +59,7 @@ clear whole cache store def self.clear # workaround, set test cache before clear whole cache, Rails.cache.clear complains about not existing cache dir - Cache.write( 'test', 1 ) + Cache.write('test', 1) Rails.cache.clear end