Class: Site
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Site
- Defined in:
- app/models/site.rb
Class Method Summary collapse
Class Method Details
.by_host(host) ⇒ Object
22 23 24 |
# File 'app/models/site.rb', line 22 def by_host(host) Site.count == 1 ? Site.first : Site.find_by_host(host) # TODO figure out how we want to do this ... end |
.install(params) ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/models/site.rb', line 14 def install(params) User.skip_callbacks do # TODO remove user dependency, test failure site = Site.create!(params[:site]) site.account.users.first.confirm! site end end |