Class ResourceCode
In: lib/resource_code.rb
Parent: ActiveRecord::Base

Methods

Public Class methods

ResourceCode associated to an Liferay class

Args:

 - :companyid
 - :name
 - :scope (defaults to 4)

[Source]

    # File lib/resource_code.rb, line 19
19:   def self.find_by_liferay_class(args={})
20:     args.update(:scope => 4) unless args[:scope]
21:     ResourceCode.find(:first,
22:       :conditions => "companyid=#{args[:companyid]} AND name='#{args[:name]}' AND scope=#{args[:scope]}")
23:   end

[Validate]