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