Skip to content

Commit

Permalink
Remove Fillable module (#271)
Browse files Browse the repository at this point in the history
It is not necessary
  • Loading branch information
paulcsmith committed Jul 24, 2018
1 parent 9c4a1b7 commit 189dd64
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion spec/form_spec.cr
Expand Up @@ -179,7 +179,6 @@ describe "LuckyRecord::Form" do
form.nickname.is_a?(LuckyRecord::Field).should be_true
form.name.value.should eq "someone"
form.name.is_a?(LuckyRecord::FillableField).should be_true
form.name.is_a?(LuckyRecord::Fillable).should be_true
end
end

Expand Down
1 change: 0 additions & 1 deletion spec/virtual_spec.cr
Expand Up @@ -16,7 +16,6 @@ end
describe "virtual in forms" do
it "is a FillableField" do
form.password_confirmation.should be_a(LuckyRecord::FillableField(String?))
form.password_confirmation.should be_a(LuckyRecord::Fillable)
form.password_confirmation.name.should eq(:password_confirmation)
form.password_confirmation.form_name.should eq("virtual")
end
Expand Down
10 changes: 0 additions & 10 deletions src/lucky_record/fillable_field.cr
@@ -1,14 +1,4 @@
require "./field"

module LuckyRecord::Fillable
abstract def name
abstract def value
abstract def form_name
abstract def errors
abstract def valid?
abstract def changed?
end

class LuckyRecord::FillableField(T) < LuckyRecord::Field(T)
include LuckyRecord::Fillable
end

0 comments on commit 189dd64

Please sign in to comment.