You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that at some point in Rhodes' evolution, Rhom started ignoring {} around object IDs. I'm not quite sure when that started, but it is easily demonstrated. Search for the same object ID, with or without {} around it. With new_orm = 0 both will succeed. With new_orm = 1 it will fail with the surrounding {}.
I'm not sure what the developers' intention is. Ignoring {} seems a hack to work-around the fact that Rhodes url_for() likes to gratuitously add {} around object IDs in URLs. There is no good reason that I know of to do this! Maybe the thought was that this would make it easy to use JSON parsing to turn the object ID into a native type?
In any case, the {} are a pain to deal with. I have old code sprinkled everywhere that looks like this:
@venue=Venue.find@params['id'].to_s.gsub/[{}]/,''
However, this seems no longer needed, because at some point somebody changed Rhom to just ignore the {}.
This hasn't been applied to newORM, though, and so it is inconsistent with oldORM.
You should decide what to do about the whole {} mess, and then whether or not this should still be "fixed" in Rhom.
The text was updated successfully, but these errors were encountered:
I notice that newORM IDs do not have a decimal point (or period) in them, as oldORM IDs do.
This seems a red herring, though. I can't think of a reason that this would influence a decision to include or not include {} around object IDs in URLs.
There's no REST "standard" that I know of that uses {}. I have no idea where this convention came from, and perhaps the URL convention should be reviewed. It would at least be informative to understand why the {} are even being used.
It seems that at some point in Rhodes' evolution, Rhom started ignoring
{}
around object IDs. I'm not quite sure when that started, but it is easily demonstrated. Search for the same object ID, with or without{}
around it. Withnew_orm = 0
both will succeed. Withnew_orm = 1
it will fail with the surrounding{}
.I'm not sure what the developers' intention is. Ignoring
{}
seems a hack to work-around the fact that Rhodesurl_for()
likes to gratuitously add{}
around object IDs in URLs. There is no good reason that I know of to do this! Maybe the thought was that this would make it easy to use JSON parsing to turn the object ID into a native type?In any case, the
{}
are a pain to deal with. I have old code sprinkled everywhere that looks like this:However, this seems no longer needed, because at some point somebody changed Rhom to just ignore the
{}
.This hasn't been applied to newORM, though, and so it is inconsistent with oldORM.
You should decide what to do about the whole
{}
mess, and then whether or not this should still be "fixed" in Rhom.The text was updated successfully, but these errors were encountered: