Sha256: 4ee3974f48f146e941ea46375a24f20ce92d58070350584c396bbffced4f25e9

Contents?: true

Size: 437 Bytes

Versions: 12

Compression:

Stored size: 437 Bytes

Contents

class AttributesController < ApplicationController
  before_filter :login_required

  def index
    @attributes = schema.attributes
  end

  def show
    key = params[:id].to_a.flatten.compact[0]
    raise ActiveRecord::RecordNotFound if key.nil?
    @attribute = schema.attributes.find do |attribute|
      attribute.name == key or
        attribute.id == key
    end
    raise ActiveRecord::RecordNotFound if @attribute.nil?
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
activeldap-1.2.3 examples/al-admin/app/controllers/attributes_controller.rb
activeldap3-1.2.3 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.2.2 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.2.1 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.2.0 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.1.0 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-0.9.0 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.0.0 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-0.10.0 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.0.9 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.0.2 examples/al-admin/app/controllers/attributes_controller.rb
activeldap-1.0.1 examples/al-admin/app/controllers/attributes_controller.rb