Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def events_for(current_profile = nil, with_w2b = false)
- if current_profile
- if current_profile.editor? || current_profile.admin?
- events
- elsif current_profile == self
- with_w2b ? (events + Event.w2b.published).uniq : events
- else
- events_published
- end
- else
- events_published
- end
- end
Add Comment
Please, Sign In to add comment