Created
November 8, 2015 15:15
-
-
Save sauy7/8b4155e6aca96e42cd18 to your computer and use it in GitHub Desktop.
Trailblazer: Uninitialized constant Thing::Update (contract.rb:5)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Thing::Create::Contract < Reform::Form | |
... | |
end | |
class Thing::Update::Contract < Thing::Create::Contract | |
... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Thing < ActiveRecord::Base | |
class Create < Trailblazer::Operation | |
include Model | |
model Thing, :create | |
require_dependency 'thing/contract' | |
self.contract_class = Contract | |
contract_class.model Thing | |
def process(params) | |
... | |
end | |
end | |
class Update < Create | |
action :update | |
def process(params) | |
... | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment