chore: rubocop
chore: fix api test conventions chore: rubocop -A spec/ chore: more rubocop -A fix failing test rubocop fixes removes helper methods that are in my opinion dead code more rubocop fixes rubocop -a --auto-gen-config
This commit is contained in:
parent
f6fb804bbe
commit
fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions
|
|
@ -4,23 +4,23 @@ class SharedArticle < ApplicationRecord
|
|||
# set correct table_name in external DB
|
||||
self.table_name = 'articles'
|
||||
|
||||
belongs_to :shared_supplier, :foreign_key => :supplier_id
|
||||
belongs_to :shared_supplier, foreign_key: :supplier_id
|
||||
|
||||
def build_new_article(supplier)
|
||||
supplier.articles.build(
|
||||
:name => name,
|
||||
:unit => unit,
|
||||
:note => note,
|
||||
:manufacturer => manufacturer,
|
||||
:origin => origin,
|
||||
:price => price,
|
||||
:tax => tax,
|
||||
:deposit => deposit,
|
||||
:unit_quantity => unit_quantity,
|
||||
:order_number => number,
|
||||
:article_category => ArticleCategory.find_match(category),
|
||||
name: name,
|
||||
unit: unit,
|
||||
note: note,
|
||||
manufacturer: manufacturer,
|
||||
origin: origin,
|
||||
price: price,
|
||||
tax: tax,
|
||||
deposit: deposit,
|
||||
unit_quantity: unit_quantity,
|
||||
order_number: number,
|
||||
article_category: ArticleCategory.find_match(category),
|
||||
# convert to db-compatible-string
|
||||
:shared_updated_on => updated_on.to_formatted_s(:db)
|
||||
shared_updated_on: updated_on.to_fs(:db)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue