public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
insoshi / app / helpers / shared_helper.rb
100644 13 lines (10 sloc) 0.366 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
# Helpers added to this module are available in both controllers and views.
module SharedHelper
 
  def current_person?(person)
    logged_in? and person == current_person
  end
  
  # Return true if a person is connected to (or is) the current person
  def connected_to?(person)
    current_person?(person) or Connection.connected?(person, current_person)
  end
end