• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

foodcoops / foodsoft / 2403798182

pending completion
2403798182

push

github

Patrick Gansterer
[Readme.md] Fix Gitpod link pointing to original repo 

1891 of 3244 relevant lines covered (58.29%)

1.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/app/models/shared_article.rb
1
class SharedArticle < ApplicationRecord
1✔
2
  # connect to database from sharedLists-Application
3
  SharedArticle.establish_connection(FoodsoftConfig[:shared_lists])
1✔
4
  # set correct table_name in external DB
5
  self.table_name = 'articles'
1✔
6

7
  belongs_to :shared_supplier, :foreign_key => :supplier_id
1✔
8

9
  def build_new_article(supplier)
1✔
10
    supplier.articles.build(
×
11
      :name => name,
12
      :unit => unit,
13
      :note => note,
14
      :manufacturer => manufacturer,
15
      :origin => origin,
16
      :price => price,
17
      :tax => tax,
18
      :deposit => deposit,
19
      :unit_quantity => unit_quantity,
20
      :order_number => number,
21
      :article_category => ArticleCategory.find_match(category),
22
      # convert to db-compatible-string
23
      :shared_updated_on => updated_on.to_formatted_s(:db)
24
    )
25
  end
26
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2024 Coveralls, Inc