From 47a54a550ecc42277d87e9ec77884be73c9f3292 Mon Sep 17 00:00:00 2001 From: Aaron Russell Date: Tue, 27 Oct 2009 00:31:37 +0000 Subject: [PATCH] Updated dtyling on RDOC --- README.rdoc | 54 ++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/README.rdoc b/README.rdoc index 019bede..5f4a895 100644 --- a/README.rdoc +++ b/README.rdoc @@ -39,19 +39,19 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra === Company -*Timelines* +Timelines @invoice_timeline = Company.invoice_timeline @tax_timeline = Company.tax_timeline === Contacts -*Find contacts* +Find contacts @contacts = Contact.find :all # returns all contacts @contact = Contact.find id # returns specific contact -*Create contact* +Create contact # Required attributes # :first_name @@ -60,12 +60,12 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra @contact = Contact.new params @contact.save -*Update contact* +Update contact @contact.first_name = 'Joe' @contact.save -*Delete contact* +Delete contact Contact.delete id # or @@ -73,12 +73,12 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra === Projects -*Find projects* +Find projects @projects = Project.find :all # returns all projects @project = Project.find id # returns specific project -*Create project* +Create project # Required attribues # :contact_id @@ -91,30 +91,30 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra @project = Project.new params @project.save -*Update project* +Update project @project.name = 'Web design project' @project.save -*Delete project* +Delete project Project.delete id # or @project.destroy -*Nested resources* +Nested resources @invoices = @project.invoices @timeslips = @project.timeslips === Tasks -*Find tasks* +Find tasks @tasks = Task.find :all # returns all tasks @task = Task.find id # returns specific task -*Create task* +Create task # Required attributes # :name @@ -122,12 +122,12 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra @task = Task.new params @task.save -*Update task* +Update task @task.name = 'Create wireframes' @task.save -*Delete task* +Delete task Task.delete id # or @@ -135,12 +135,12 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra === Invoices -*Find Invoices* +Find Invoices @invoices = Invoice.find :all # returns all invoices @invoice = Invoice.find id # returns specific invoice -*Create invoice* +Create invoice # Required attributes # :contact_id @@ -152,18 +152,18 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra @invoice = Invoice.new params @invoice.save -*Update invoice* +Update invoice @invoice.status = 'Sent' @invoice.save -*Delete invoice* +Delete invoice Invoice.delete id # or @invoice.destroy -*Changing status* +Changing status @invoice.mark_as_draft @invoice.mark_as_sent @@ -171,12 +171,12 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra === Invoice items -*Find invoice items* +Find invoice items @invoice_items = InvoiceItem.find :all # returns all invoice items @invoice_item = InvoiceItem.find id # returns specific invoice item -*Create invoice item* +Create invoice item # Required attributes # :item_type # must be Hours, Days, Months, Years, Products, Services, Expenses, Discount, Credit, Comment @@ -188,12 +188,12 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra @invoice_item = InvoiceItem.new params @invoice_item.save -*Update invoice item* +Update invoice item @invoice_item.name = 'Create wireframes' @invoice_item.save -*Delete invoice item* +Delete invoice item InvoiceItem.delete id # or @@ -201,13 +201,13 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra === Timeslips -*Find timeslips* +Find timeslips @timeslips = Timeslip.find :all, :params => {:from => '2009-10-01', :to => '2009-10-30'} # returns all timeslips (:from and :to dates required) @timeslip = Timeslip.find id # returns specific timeslip -*Create timeslip* +Create timeslip # Required attributes # :user_id @@ -218,12 +218,12 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra @timeslip = Timeslip.new params @timeslip.save -*Update timeslip* +Update timeslip @timeslip.hours = '3.5' @timeslip.save -*Delete timeslip* +Delete timeslip Timeslip.delete id # or