Module: Adminable::ResourceConcern

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/adminable/resource_concern.rb

Instance Method Summary collapse

Instance Method Details

#adminableObject



5
6
7
8
9
10
11
12
13
# File 'app/models/concerns/adminable/resource_concern.rb', line 5

def adminable
  %i(title name email login id).each do |name|
    begin
      return OpenStruct.new(name: public_send(name))
    rescue NoMethodError
      next
    end
  end
end