Skip to content

Instantly share code, notes, and snippets.

@loriculberson
Created February 17, 2015 01:10
Show Gist options
  • Select an option

  • Save loriculberson/2cc68cc03008446b1670 to your computer and use it in GitHub Desktop.

Select an option

Save loriculberson/2cc68cc03008446b1670 to your computer and use it in GitHub Desktop.
WIP create method
def self.create(task)
database.transaction do
database[:tasks].insert("title" => task[:title], "description" => task[:description])
end
# require 'pry';binding.pry
end
@loriculberson
Copy link
Author

Two issues:

  1. I need a counter that creates unique id numbers (especially after tasks are deleted)
  2. create method needs to use the insert method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment