Skip to content

Commit

Permalink
something
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Poon committed May 16, 2012
1 parent 54db5ab commit e47304f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ def bookmark
end

def test
current_user.sendDailyEmail
end
end
7 changes: 3 additions & 4 deletions app/models/link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ class Link
field :parsely_url, :type => String
field :tags, :type => Array

after_save :addotoQueue
after_save :add_to_queue

private

def self.makeAbsolute(link)
link = URI.unescape(link)
puts 'linkage ' + link
Expand All @@ -27,8 +26,8 @@ def self.makeAbsolute(link)
end
end

protected
def addtoQueue()
def add_to_queue()

end

end
2 changes: 1 addition & 1 deletion app/models/linkQueue.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Linkquene
class Linkqueue
include Mongoid::Document
include Mongoid::Timestamps

Expand Down
3 changes: 0 additions & 3 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ class User
validates_uniqueness_of :email, :case_sensitive => false
attr_accessible :name, :email, :password, :password_confirmation, :remember_me

def sendDailyEmail
puts self.links.where(:created_at.lte => Date.today.day).execute.to_a.inspect
end

end

0 comments on commit e47304f

Please sign in to comment.