This file contains hidden or 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 CreateUser | |
def initialize(params) | |
@user = params[:user] | |
end | |
def run! | |
create_user | |
end | |
This file contains hidden or 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 CreateJob | |
def initialize(params, user) | |
@user = user | |
@params = params | |
end | |
def run! | |
create_job | |
end |
This file contains hidden or 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 CreateUser | |
def initialize(data) | |
@user_params = data | |
end | |
def run! | |
create_user | |
end |
This file contains hidden or 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
[~/Projects/surge]$ gem install eventmachine -v '1.2.3' [master][ruby-2.4.1] | |
Building native extensions. This could take a while... | |
ERROR: Error installing eventmachine: | |
ERROR: Failed to build gem native extension. | |
current directory: /Users/admin/.rvm/gems/ruby-2.4.1/gems/eventmachine-1.2.3/ext | |
/Users/admin/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20170821-20440-14nqfg8.rb extconf.rb | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of necessary | |
libraries and/or headers. Check the mkmf.log file for more details. You may |
This file contains hidden or 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 Questionnaire < ApplicationRecord | |
has_many :questions | |
has_many :member_questionnaires | |
has_many :users, through: :member_questionnaires | |
accepts_nested_attributes_for :question | |
end | |
class Question < ApplicationRecord | |
belongs_to :questionnaire |
This file contains hidden or 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 Questionnaire < ApplicationRecord | |
has_many :questions | |
has_many :member_questionnaires | |
has_many :users, through: :member_questionnaires | |
accepts_nested_attributes_for :questions | |
end | |
class Question < ApplicationRecord | |
belongs_to :questionnaire | |
has_one :answer |
This file contains hidden or 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
Failures: | |
1) member logs in missing questionnaire | |
Failure/Error: raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}" | |
ActionController::RoutingError: | |
No route matches [POST] "/questionnaire_answers/1/new" |
This file contains hidden or 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 Questionnaire < ApplicationRecord | |
has_many :questions | |
has_many :member_questionnaires | |
has_many :users, through: :member_questionnaires | |
accepts_nested_attributes_for :questions | |
end | |
class Question < ApplicationRecord | |
belongs_to :questionnaire |
This file contains hidden or 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 QuestionnaireAnswersController < ApplicationController | |
def new | |
find_questionnaire | |
@answer = QuestionnaireAnswer.new | |
end | |
def create | |
@answers_creation = CreateAnswers.new(params, current_user) | |
@answers_creation.run! | |
end |
This file contains hidden or 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
Failures: | |
1) Admin::InvoicesController POST create it creates a new invoice | |
Failure/Error: "application_fee": null, | |
ArgumentError: | |
wrong number of arguments (given 0, expected 1+) |