ish_models 0.0.33.14 → 0.0.33.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/app_model2.rb +1 -1
  3. data/lib/report.rb +5 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 063c5f40da3709fb8a008dc75cd85ee3bc02c027
4
- data.tar.gz: 5d75cea5622b0e520ea75d55edae586f96a77561
3
+ metadata.gz: 5ad3b1bbc9b40834687078d507f883a7e49abd21
4
+ data.tar.gz: 29fdd56426a79b367e2649897bc9b930caf2f8a5
5
5
  SHA512:
6
- metadata.gz: f8801d6662efffbdd4e13f186445a3463bce969cd054cca4fe35b015b094c2540b8689c04b6257f73bfafd35941135b34e89a7be45cdf9ed8dbb7391af88bb41
7
- data.tar.gz: 72f96b79d2a0d4626c02c5a7f175070e2c0f50008425dd5b2cf75a04472bfdb2ba9a8b62ff798e68f4d21d50d5701124463f046776b04f7ae8c8377fd6691bdc
6
+ metadata.gz: f18537c912f1967bdc49a38f9a481721ed50dfef37df84e5e11277dde853ef4c989b39616b040a812ca1f7f146cfa37828deb8898d25eb70f632e9a7f14e7c55
7
+ data.tar.gz: 81701b1844798ea280098c638ca8591f6d1984e13072fec9fbae8fd43ac73f0823241820e20fa095c221bd9fe034d0eb7e0ec399c303b43747b3c6cfc74f339c
data/lib/app_model2.rb CHANGED
@@ -3,7 +3,7 @@ class AppModel2
3
3
  include ::Mongoid::Timestamps
4
4
 
5
5
  field :is_feature, :type => Boolean, :default => false
6
- field :is_public, :type => Boolean, :default => true
6
+ field :is_public, :type => Boolean, :default => false
7
7
  field :is_done, :type => Boolean, :default => false
8
8
  field :is_trash, :type => Boolean, :default => false
9
9
  field :is_anonymous, :type => Boolean, :default => false
data/lib/report.rb CHANGED
@@ -108,7 +108,11 @@ class Report
108
108
 
109
109
  unless doc.city.blank?
110
110
  city = City.find doc.city.id
111
- username = doc.user.username || 'anon'
111
+ if doc.user
112
+ username = doc.user.username || 'anon'
113
+ else
114
+ username = '<username>'
115
+ end
112
116
  n = Newsitem.new :report => doc, :username => username
113
117
  city.newsitems << n
114
118
  city.save
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.14
4
+ version: 0.0.33.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox