Sha256: 924e45d82c8fb0215c34cad986cd7306441e12f108ab9de7efa71998dcf40e00

Contents?: true

Size: 609 Bytes

Versions: 6

Compression:

Stored size: 609 Bytes

Contents

# frozen_string_literal: true

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
class List < ActiveRecord::Base
  validates_presence_of :name
  validates_presence_of :url
  belongs_to :user

  # Parses the controller from the url
  def controller
    (url || "").sub(/\A\//, '').split(/\/|\?/).first
  end

  ActiveSupport.run_load_hooks(:fat_free_crm_list, self)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fat_free_crm-0.18.2 app/models/list.rb
fat_free_crm-0.17.3 app/models/list.rb
fat_free_crm-0.18.1 app/models/list.rb
fat_free_crm-0.18.0 app/models/list.rb
fat_free_crm-0.17.2 app/models/list.rb
fat_free_crm-0.17.1 app/models/list.rb