mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b63d532f1e
So this bug is kinda funky. The code path is basically "if we weren't passed an
instance of the class we compose to, and we have a converter, call that".
Ignoring the hash case for a moment, everything after that was roughly intended
to be the "else" clause, meaning that we are expected to have an instance of
the class we compose to. Really, we should be blowing up in that case, as we
can give a much better error message than what they user will likely get (e.g.
`NameError: No method first for String` or something). Still, Ruby is duck
typed, so if the object you're assigning responds to the same methods as the
type you compose to, knock yourself out.
The hash case was added in
|
||
---|---|---|
.. | ||
admin | ||
autoloadable | ||
publisher | ||
admin.rb | ||
aircraft.rb | ||
arunit2_model.rb | ||
author.rb | ||
auto_id.rb | ||
binary.rb | ||
bird.rb | ||
book.rb | ||
boolean.rb | ||
bulb.rb | ||
cake_designer.rb | ||
car.rb | ||
carrier.rb | ||
cat.rb | ||
categorization.rb | ||
category.rb | ||
chef.rb | ||
citation.rb | ||
club.rb | ||
college.rb | ||
column.rb | ||
column_name.rb | ||
comment.rb | ||
company.rb | ||
company_in_module.rb | ||
computer.rb | ||
contact.rb | ||
content.rb | ||
contract.rb | ||
country.rb | ||
course.rb | ||
customer.rb | ||
customer_carrier.rb | ||
dashboard.rb | ||
default.rb | ||
department.rb | ||
developer.rb | ||
dog.rb | ||
dog_lover.rb | ||
doubloon.rb | ||
drink_designer.rb | ||
edge.rb | ||
electron.rb | ||
engine.rb | ||
entrant.rb | ||
essay.rb | ||
event.rb | ||
eye.rb | ||
face.rb | ||
friendship.rb | ||
guid.rb | ||
guitar.rb | ||
hotel.rb | ||
image.rb | ||
interest.rb | ||
invoice.rb | ||
item.rb | ||
job.rb | ||
joke.rb | ||
keyboard.rb | ||
legacy_thing.rb | ||
lesson.rb | ||
line_item.rb | ||
liquid.rb | ||
man.rb | ||
matey.rb | ||
member.rb | ||
member_detail.rb | ||
member_type.rb | ||
membership.rb | ||
mentor.rb | ||
minimalistic.rb | ||
minivan.rb | ||
mixed_case_monkey.rb | ||
mocktail_designer.rb | ||
molecule.rb | ||
movie.rb | ||
node.rb | ||
notification.rb | ||
order.rb | ||
organization.rb | ||
owner.rb | ||
parrot.rb | ||
person.rb | ||
personal_legacy_thing.rb | ||
pet.rb | ||
pet_treasure.rb | ||
pirate.rb | ||
possession.rb | ||
post.rb | ||
price_estimate.rb | ||
professor.rb | ||
project.rb | ||
publisher.rb | ||
randomly_named_c1.rb | ||
rating.rb | ||
reader.rb | ||
recipe.rb | ||
record.rb | ||
reference.rb | ||
reply.rb | ||
ship.rb | ||
ship_part.rb | ||
shop.rb | ||
shop_account.rb | ||
speedometer.rb | ||
sponsor.rb | ||
string_key_object.rb | ||
student.rb | ||
subject.rb | ||
subscriber.rb | ||
subscription.rb | ||
tag.rb | ||
tagging.rb | ||
task.rb | ||
topic.rb | ||
toy.rb | ||
traffic_light.rb | ||
treasure.rb | ||
treaty.rb | ||
tree.rb | ||
tuning_peg.rb | ||
tyre.rb | ||
user.rb | ||
uuid_child.rb | ||
uuid_item.rb | ||
uuid_parent.rb | ||
vegetables.rb | ||
vehicle.rb | ||
vertex.rb | ||
warehouse_thing.rb | ||
wheel.rb | ||
without_table.rb | ||
zine.rb |