Existing Rails model without fetching it from the database
问题 Does anyone know if its possible to create a model instance and apply the ID and any other attributes without having to load it from the database? I tried doing this, but the associations are not fetched from the database :( Any ideas? EDIT What I want to accomplish is simply this: Fetch an existing record from the database. Store as "hashed" output of the record into redis or some other memory store. Next time when that record is fetched, fetch the cached store first and if it is not found