ish_models 0.0.33.19 → 0.0.33.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41b6fc5cac834800b974009977d2bd7f5c489fbd
4
- data.tar.gz: 5d75f557c7658de50b7836606c5282baebea1e15
3
+ metadata.gz: 6b32908f187bf28f4a80d8ab62bb63cbb881cb4a
4
+ data.tar.gz: 165a8e17d001a3d343d598a1be797ac9df09ccaf
5
5
  SHA512:
6
- metadata.gz: be674304cf166434557ddfac7d1db8594d73508ad52312139c568d76eae21072f49ef49250454ca8a55c007c17a1d8de875b000f842c7d30088519bb8abb6cc4
7
- data.tar.gz: 1434cf5be3cb5a323cb1e87ffb581f79ee8b2d1da2283a1b51e0dfa35a6adc8b824d35a59b32ca99a7dc263d8d9b83e9bd5bb8f56704399f7c9f29e6f906163a
6
+ metadata.gz: 5655c346570d3bfe0cfaaccff910cbadc924951be99f47bacda78dd84ee63baa3d1531843fc3951efbe3d5eb40d460472723a4efcdf2a0f8e927468d7f545e1c
7
+ data.tar.gz: a1cc3ffe056615528c523b72ba650e784ccab20b4be48f8cf3e061bd1c2e30b80733dde1b1ae02c34cb436997c1febe087ec9578f74cfc856980a6e56317a26d
data/lib/app_model2.rb CHANGED
@@ -19,8 +19,8 @@ class AppModel2
19
19
  field :y, :type => Float
20
20
 
21
21
  def self.list conditions = { :is_trash => false }
22
- out = self.where( conditions).order_by( :name => :asc )
23
- [['', nil]] + out.map { |item| [ item.name, item.id ] }
22
+ out = self.where( conditions ).order_by( :created_at => :desc )
23
+ [['', nil]] + out.map { |item| [ "#{item.created_at.strftime('%Y%m%d')} #{item.name}", item.id ] }
24
24
  end
25
25
 
26
26
  private
data/lib/ish_models.rb CHANGED
@@ -36,5 +36,6 @@ require 'public_item.rb'
36
36
  require 'report.rb'
37
37
  require 'site.rb'
38
38
  require 'tag.rb'
39
+ require 'user_profile.rb'
39
40
  require 'venue.rb'
40
41
  require 'video.rb'
@@ -0,0 +1,10 @@
1
+
2
+ class UserProfile
3
+ include Mongoid::Document
4
+ include Mongoid::Timestamps
5
+
6
+ field :username
7
+
8
+ has_many :videos
9
+
10
+ end
@@ -0,0 +1,8 @@
1
+
2
+ class UserProfile
3
+ include Mongoid::Document
4
+ include Mongoid::Timestamps
5
+
6
+ field :username
7
+
8
+ end
data/lib/video.rb CHANGED
@@ -27,6 +27,7 @@ class Video
27
27
  validates :site, :presence => true
28
28
  belongs_to :user
29
29
  validates :user, :presence => true
30
+ belongs_to :user_profile, :optional => true
30
31
  has_many :newsitems
31
32
 
32
33
  accepts_nested_attributes_for :site, :tag, :city
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.19
4
+ version: 0.0.33.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -80,6 +80,8 @@ files:
80
80
  - lib/report.rb
81
81
  - lib/site.rb
82
82
  - lib/tag.rb
83
+ - lib/user_profile.rb
84
+ - lib/user_profile.rb~
83
85
  - lib/venue.rb
84
86
  - lib/video.rb
85
87
  homepage: http://wasya.co