Module: Saucy::Project::ClassMethods

Defined in:
lib/saucy/project.rb

Instance Method Summary collapse

Instance Method Details

#build_with_default_permissionsObject



49
50
51
# File 'lib/saucy/project.rb', line 49

def build_with_default_permissions
  new.assign_default_permissions
end

#by_nameObject



45
46
47
# File 'lib/saucy/project.rb', line 45

def by_name
  order("projects.name")
end

#visible_to(user) ⇒ Object



41
42
43
# File 'lib/saucy/project.rb', line 41

def visible_to(user)
  where(['projects.id IN(?)', user.project_ids])
end