Module: Saucy::Project::ClassMethods
- Defined in:
- lib/saucy/project.rb
Instance Method Summary collapse
- #active ⇒ Object
- #archived ⇒ Object
- #build_with_default_permissions ⇒ Object
- #by_name ⇒ Object
- #visible_to(user) ⇒ Object
Instance Method Details
#active ⇒ Object
55 56 57 |
# File 'lib/saucy/project.rb', line 55 def active where(:archived => false) end |
#archived ⇒ Object
51 52 53 |
# File 'lib/saucy/project.rb', line 51 def archived where(:archived => true) end |
#build_with_default_permissions ⇒ Object
63 64 65 |
# File 'lib/saucy/project.rb', line 63 def new. end |
#by_name ⇒ Object
59 60 61 |
# File 'lib/saucy/project.rb', line 59 def by_name order("projects.name") end |
#visible_to(user) ⇒ Object
47 48 49 |
# File 'lib/saucy/project.rb', line 47 def visible_to(user) where(['projects.id IN(?)', user.project_ids]) end |