Class: Pageflow::CnameThemingRequestScope

Inherits:
Object
  • Object
show all
Defined in:
app/models/pageflow/cname_theming_request_scope.rb

Instance Method Summary collapse

Instance Method Details

#call(themings, request) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'app/models/pageflow/cname_theming_request_scope.rb', line 3

def call(themings, request)
  themings.where(<<-SQL, host: request.host)
    cname = :host OR
    FIND_IN_SET(
      :host,
      REPLACE(additional_cnames, SPACE(1), "")
    )
  SQL
end