Skip to content

Commit

Permalink
bug fix on inherited
Browse files Browse the repository at this point in the history
  • Loading branch information
drujensen committed Nov 17, 2016
1 parent 96fcfe9 commit a490b3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/kemalyst-model.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ require "kemalyst-validators"

# Kemalyst::Model is the base class for your model objects.
class Kemalyst::Model
include Kemalyst::Validators
macro inherited
include Kemalyst::Validators
end

# specify the database adapter you will be using for this model.
# mysql, pg, sqlite, etc.
Expand Down Expand Up @@ -136,7 +138,7 @@ class Kemalyst::Model
@updated_at = Time.now
params_and_id = params
params_and_id << value
@@adapter.update @@table_name, self.class.fields, params_and_id
@@adapter.update @@table_name, self.class.fields, params_and_id
else
@created_at = Time.now
@updated_at = Time.now
Expand Down

0 comments on commit a490b3f

Please sign in to comment.