Class: TokyoMetro::Factory::Seed::Static::TrainType::Custom::Main::Hash
- Inherits:
-
Operator::Hash
- Object
- Common::Group
- Common::Hash
- MetaClass::Hash
- Operator::Hash
- TokyoMetro::Factory::Seed::Static::TrainType::Custom::Main::Hash
- Defined in:
- lib/tokyo_metro/factory/seed/static/train_type/custom/main/hash.rb
Instance Method Summary collapse
Methods inherited from Common::Hash
Methods inherited from Common::Group
Constructor Details
This class inherits a constructor from TokyoMetro::Factory::Seed::Common::Hash
Instance Method Details
#seed_instance_for_escaping_undefined ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/tokyo_metro/factory/seed/static/train_type/custom/main/hash.rb', line 5 def seed_instance_for_escaping_undefined train_type_in_api = ::TrainTypeInApi.find_by( same_as: "odpt.TrainType:TokyoMetro.Unknown" ) h = { same_as: "custom.TrainType:Undefined" , note: "未定義" , train_type_in_api_id: train_type_in_api.id , railway_line_id: ::RailwayLine.find_by_name_ja( "未定義" ) } ::TrainType.find_or_create_by(h) end |