>Colin Law wrote in post #1040530: > In the controller parse the string and loop round, creating the new > objects and saving them one at a time.
That makes a ton of sense. Thank you very much! >> 2) How do I store entirely-ruby-determined attributes like a string's >> length? > > Don't store values that can be re-calculated, such as the string's > length in the database unless efficiency becomes an issue. Add member > methods to the model to return the calculated values then in the > future if you really need to then you can add the attributes to the > database. Almost always the bottlenecks in an app will not be in the > places you initially imagine them to be. If you did want to store > these values though then you could use a before_filter to calculate > them when the record is created or updated. I sort of simplified the calculations I want to perform on the strings to get a general idea of this sort of thing. In actuality it includes web-access/data-mining, so would be a very bad idea to perform it every single time (for one, it would become hugely slow if I keep old results, but more importantly I certainly don't want to be excessive with anybody else's bandwidth; it would be a very rude thing of me to do!) before_filter could work as a solution, I'll try it out. There won't be any edit option, or anything like that. Either that or I was thinking that it might simplify things to scratch the keywords section in the database, and serialize it as an array (or 2-d array), only because currently the ideas for the app don't take advantage of any database-enhanced features, such as search; it would simply pour out the past 100 entries sequentially. Of course that might harm any future expandability/new features I might want to add. I might be better off building a good foundation and using the looped control idea. Anyway, thank you kindly for the ideas. I really appreciate them! ~Dylan -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

