diff --git a/lib/mini_kickstarter_db.rb b/lib/mini_kickstarter_db.rb index 73b3b95..069c90e 100644 --- a/lib/mini_kickstarter_db.rb +++ b/lib/mini_kickstarter_db.rb @@ -11,11 +11,11 @@ def initialize(filename) end end + # If this project grew any more complicated, I'd replace all of these custom queries with ActiveRecord. def create_project(project_name, target_dollar_amount) @db.execute('insert into projects values(?, ?, ?);', nil, project_name, target_dollar_amount) end - # If this project grows any more complicated, I'd replace all of these custom searches with ActiveRecord. def find_project_id_by_project_name(project_name) @db.get_first_value('select id from projects where project_name = ?', project_name) end