lib/enju_nii.rb in enju_nii-0.2.1 vs lib/enju_nii.rb in enju_nii-0.3.0.beta.1
- old
+ new
@@ -1,6 +1,5 @@
-# -*- encoding: utf-8 -*-
require "enju_nii/engine"
require 'open-uri'
require 'enju_nii/cinii_book'
module EnjuNii
@@ -10,10 +9,10 @@
end
module ClassMethods
def enju_nii_cinii_books
include EnjuNii::CiNiiBook
- belongs_to :nii_type
+ belongs_to :nii_type, optional: true
end
def import_isbn(isbn)
manifestation = Manifestation.import_from_cinii_books(isbn: isbn)
manifestation