Skip to content

Commit

Permalink
minor cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed May 4, 2014
1 parent 6f7c6bd commit 304cfad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/reform/contract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Contract # DISCUSS: make class?

extend Uber::InheritableAttr
inheritable_attr :representer_class
self.representer_class = Reform::Representer.for(:form_class => Reform::Contract)
self.representer_class = Reform::Representer.for(:form_class => self)

inheritable_attr :features
self.features = []
Expand Down
4 changes: 2 additions & 2 deletions lib/reform/form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

module Reform
class Form < Contract
self.representer_class = Reform::Representer.for(:form_class => Reform::Form)
self.representer_class = Reform::Representer.for(:form_class => self)

def aliased_model
# TODO: cache the Expose.from class!
Reform::Expose.from(self.class.representer_class).new(:model => model)
Reform::Expose.from(mapper).new(:model => model)
end

require "reform/form/virtual_attributes"
Expand Down

0 comments on commit 304cfad

Please sign in to comment.