apotonick / gemgem-trbrb

The Trailblazer book's example app.
http://trailblazer.to#book
137 stars 60 forks source link

How to separate contract/form files from operations when inheriting Update from Create? #11

Closed sauy7 closed 8 years ago

sauy7 commented 8 years ago

I've created a gist of my (simplified) crud.rb and contract.rb files: https://gist.github.com/sauy7/8b4155e6aca96e42cd18

When trying to start rails server, I get the error that Thing::Update is an uninitialized constant, from line 5 of contarct.rb.

I was following instructions from the book and digging in this project's code for hints to follow but could not see a working example.

apotonick commented 8 years ago

Always use require_dependency when things don't work. Also, did you add trailblazer-rails to the Gemfile?

sauy7 commented 8 years ago

Finally got back to my project and updated everything to the latest way of structuring operations and contracts and this issue is gone.

apotonick commented 8 years ago

That is great! You've been missed!