Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove unused methods
  • Loading branch information
fabianrbz committed Nov 21, 2012
1 parent 232539c commit 99abc22
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 42 deletions.
6 changes: 0 additions & 6 deletions app/models/person.rb
Expand Up @@ -167,12 +167,6 @@ def self.search_order
}.call
end

def self.public_search(query, opts={})
return [] if query.to_s.blank? || query.to_s.length < 3
sql, tokens = self.search_query_string(query)
Person.searchable.where(sql, *tokens)
end

def name(opts = {})
if self.profile.nil?
fix_profile
Expand Down
4 changes: 0 additions & 4 deletions app/models/photo.rb
Expand Up @@ -128,10 +128,6 @@ def ensure_user_picture
}
end

def thumb_hash
{:thumb_url => url(:thumb_medium), :id => id, :album_id => nil}
end

def queue_processing_job
Resque.enqueue(Jobs::ProcessPhoto, self.id)
end
Expand Down
9 changes: 0 additions & 9 deletions app/models/post.rb
Expand Up @@ -103,11 +103,6 @@ def reshare_for(user)
reshares.where(:author_id => user.person.id).first
end

def participation_for(user)
return unless user
participations.where(:author_id => user.person.id).first
end

def like_for(user)
return unless user
likes.where(:author_id => user.person.id).first
Expand All @@ -133,10 +128,6 @@ def activity_streams?
false
end

def triggers_caching?
true
end

def comment_email_subject
I18n.t('notifier.a_post_you_shared')
end
Expand Down
11 changes: 0 additions & 11 deletions app/models/user.rb
Expand Up @@ -165,17 +165,6 @@ def has_hidden_shareables_of_type?(t = Post)
self.hidden_shareables[share_type].present?
end


def self.create_from_invitation!(invitation)
user = User.new
user.generate_keys
user.send(:generate_invitation_token)
user.email = invitation.identifier if invitation.service == 'email'
# we need to make a custom validator here to make this safer
user.save(:validate => false)
user
end

def send_reset_password_instructions
generate_reset_password_token! if should_generate_reset_token?
Resque.enqueue(Jobs::ResetPassword, self.id)
Expand Down
5 changes: 0 additions & 5 deletions lib/stream/base.rb
Expand Up @@ -50,11 +50,6 @@ def people
includes(:profile)
end

# @return [String]
def contacts_link_title
I18n.translate('aspects.selected_contacts.view_all_contacts')
end

# @return [String] def contacts_title 'change me in lib/base_stream.rb!'
def contacts_title
'change me in lib/base_stream.rb!'
Expand Down
7 changes: 0 additions & 7 deletions spec/support/user_methods.rb
Expand Up @@ -31,11 +31,4 @@ def post(class_name, opts = {})
p
end
end

def post_at_time(time)
to_aspect = self.aspects.length == 1 ? self.aspects.first : self.aspects.where(:name => "generic")
p = self.post(:status_message, :text => 'hi', :to => to_aspect)
p.created_at = time
p.save!
end
end

0 comments on commit 99abc22

Please sign in to comment.