http://edgar411.com

Google Custom Search



You are

|| Login | Register | Why Register? ||


Browse Authors Of Fragments And Output Reports

Browse Stock Symbols

Browse EDGAR Input Reports

Browse Output Reports

Browse Fragments Used To Create Output Reports


About Edgar411.com

Contact Edgar411.com

Terms and Conditions

Built by http://bikle.com
(Rails Development/Consulting)

RDoc of Edgar411.com

RDoc of ActiveScaffold Plugin

RDoc of Hpricot 0.6

RDoc of Ruby On Rails


Translations:
Built with:
GNU Emacs
Arorem
Subversion
Piston
FreeBSD
PostgreSQL
Rails 1.2
LoginSugar
Active Scaffold
Hpricot
Lighttpd
|| Home | Symbols | Input Reports | Output Reports | Fragments ||

Show EDGAR Input Report

Owner Of This Report
bikle  
Symbol
GOOG  
EDGAR Report Name
Google-This: GOOG-10-K-2006-12-31  
EDGAR Report URL
Google-This: http://www.sec.gov/Archives/edgar/data/1288776/000119312507044494/d10k.htm  

Source Code:

/controllers/asls/rpts_controller.rb

# Provides read-only view via active_scaffold
class Asls::RptsController < ApplicationController

  skip_before_filter :authenticate_usr

  active_scaffold do |config|
    config.actions = [:list, :show, :search]
    config.label = "EDGAR Input Reports"
    config.list.columns = [:usr, :symbl, :name, :uurl]
    config.show.columns = [:usr, :symbl, :name, :uurl]
    config.columns[:usr].label = "Owner Of This Report"
    config.columns[:symbl].label = "Symbol"
    config.columns[:name].label = "EDGAR Report Name"
    config.columns[:uurl].label = "EDGAR Report URL"
  end # active_scaffold block

end

/models/rpt.rb

class Rpt < ActiveRecord::Base

  validates_uniqueness_of :name, :message => " is already being used"
  # Associations should come after callbacks
  belongs_to :symbl
  belongs_to :usr
  belongs_to :rpttype
  has_many :frgmnts
  has_many :outputrpts

  protected

  def validate
    case
    # The controller will set name = "record_usr_id_ne_session_usr_id" if
    # I try to update a record I do not own.
    when name == "record_usr_id_ne_session_usr_id"
      errors.add_to_base "You can only update your records, not other's records."
    end # case
  end # validate
end # class

/helpers/asls/rpts_helper.rb

module Asls::RptsHelper
  def name_column(record)
    return "#{googlethis(record.name)} #{record.name}"
  end # name_column
end