Skip to content

Instantly share code, notes, and snippets.

View srbiv's full-sized avatar

Stafford Brooke srbiv

View GitHub Profile
def initialize(partial_path)
@partial_path = partial_path
@output = ''
end
def render(locals)
render_content(locals)
rescue Exception => exception
format_error(exception)
end
@messages = Message.search do
any_of do
with(:user_ids, current_user.id)
all_of do
with(:user_ids).blank?
with(:school_ids, current_user.affiliated_school_ids.map {|s| s.to_s })
end
all_of do
with(:user_ids).blank?
with(:school_ids).blank?