Sha256: 0505432dbf844bd24407d9d053418efaceb13b473ce97dec902f02229316b75d

Contents?: true

Size: 353 Bytes

Versions: 29

Compression:

Stored size: 353 Bytes

Contents

module Cms
  class Editable
    def self.content_type(name)
      case name
      when /\.css\Z/
        "text/css"
      when /\.js\Z/
        "text/javascript"
      when /\.xml\Z/
        "text/xml"
      when /\.json\Z/
        "application/json"
      when /\.txt\Z/
        "text/plain"
      else
        "text/html"
      end
    end 
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
liquid_cms-0.3.2.0 app/models/cms/editable.rb
liquid_cms-0.2.2.0 app/models/cms/editable.rb
liquid_cms-0.2.1.1 app/models/cms/editable.rb
liquid_cms-0.3.1.0 app/models/cms/editable.rb
liquid_cms-0.2.1.0 app/models/cms/editable.rb
liquid_cms-0.2.0.13 app/models/cms/editable.rb
liquid_cms-0.3.0.10 app/models/cms/editable.rb
liquid_cms-0.3.0.9 app/models/cms/editable.rb
liquid_cms-0.2.0.12 app/models/cms/editable.rb
liquid_cms-0.2.0.11 app/models/cms/editable.rb
liquid_cms-0.2.0.10 app/models/cms/editable.rb
liquid_cms-0.3.0.8 app/models/cms/editable.rb
liquid_cms-0.2.0.9 app/models/cms/editable.rb
liquid_cms-0.3.0.7 app/models/cms/editable.rb
liquid_cms-0.3.0.6 app/models/cms/editable.rb
liquid_cms-0.2.0.8 app/models/cms/editable.rb
liquid_cms-0.3.0.5 app/models/cms/editable.rb
liquid_cms-0.2.0.7 app/models/cms/editable.rb
liquid_cms-0.3.0.4 app/models/cms/editable.rb
liquid_cms-0.2.0.6 app/models/cms/editable.rb