Skip to content

Commit

Permalink
Updated dtyling on RDOC
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrussell committed Oct 27, 2009
1 parent abd0ed2 commit 47a54a5
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions README.rdoc
Expand Up @@ -39,19 +39,19 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra

=== Company

*Timelines*
<b>Timelines</b>

@invoice_timeline = Company.invoice_timeline
@tax_timeline = Company.tax_timeline

=== Contacts

*Find contacts*
<b>Find contacts</b>

@contacts = Contact.find :all # returns all contacts
@contact = Contact.find id # returns specific contact

*Create contact*
<b>Create contact</b>

# Required attributes
# :first_name
Expand All @@ -60,25 +60,25 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra
@contact = Contact.new params
@contact.save

*Update contact*
<b>Update contact</b>

@contact.first_name = 'Joe'
@contact.save

*Delete contact*
<b>Delete contact</b>

Contact.delete id
# or
@contact.destroy

=== Projects

*Find projects*
<b>Find projects</b>

@projects = Project.find :all # returns all projects
@project = Project.find id # returns specific project

*Create project*
<b>Create project</b>

# Required attribues
# :contact_id
Expand All @@ -91,56 +91,56 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra
@project = Project.new params
@project.save

*Update project*
<b>Update project</b>

@project.name = 'Web design project'
@project.save

*Delete project*
<b>Delete project</b>

Project.delete id
# or
@project.destroy

*Nested resources*
<b>Nested resources</b>

@invoices = @project.invoices
@timeslips = @project.timeslips

=== Tasks

*Find tasks*
<b>Find tasks</b>

@tasks = Task.find :all # returns all tasks
@task = Task.find id # returns specific task

*Create task*
<b>Create task</b>

# Required attributes
# :name

@task = Task.new params
@task.save

*Update task*
<b>Update task</b>

@task.name = 'Create wireframes'
@task.save

*Delete task*
<b>Delete task</b>

Task.delete id
# or
@task.destroy

=== Invoices

*Find Invoices*
<b>Find Invoices</b>

@invoices = Invoice.find :all # returns all invoices
@invoice = Invoice.find id # returns specific invoice

*Create invoice*
<b>Create invoice</b>

# Required attributes
# :contact_id
Expand All @@ -152,31 +152,31 @@ Please note: version 0.2 is significantly different from 0.1 so if you are upgra
@invoice = Invoice.new params
@invoice.save

*Update invoice*
<b>Update invoice</b>

@invoice.status = 'Sent'
@invoice.save

*Delete invoice*
<b>Delete invoice</b>

Invoice.delete id
# or
@invoice.destroy

*Changing status*
<b>Changing status</b>

@invoice.mark_as_draft
@invoice.mark_as_sent
@invoice.mark_as_cancelled

=== Invoice items

*Find invoice items*
<b>Find invoice items</b>

@invoice_items = InvoiceItem.find :all # returns all invoice items
@invoice_item = InvoiceItem.find id # returns specific invoice item

*Create invoice item*
<b>Create invoice item</b>

# Required attributes
# :item_type # must be Hours, Days, Months, Years, Products, Services, Expenses, Discount, Credit, Comment
Expand All @@ -188,26 +188,26 @@ 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*
<b>Update invoice item</b>

@invoice_item.name = 'Create wireframes'
@invoice_item.save

*Delete invoice item*
<b>Delete invoice item</b>

InvoiceItem.delete id
# or
@invoice_item.destroy

=== Timeslips

*Find timeslips*
<b>Find timeslips</b>

@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*
<b>Create timeslip</b>

# Required attributes
# :user_id
Expand All @@ -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*
<b>Update timeslip</b>

@timeslip.hours = '3.5'
@timeslip.save

*Delete timeslip*
<b>Delete timeslip</b>

Timeslip.delete id
# or
Expand Down

0 comments on commit 47a54a5

Please sign in to comment.