This project is archived and is in readonly mode.
Array-like browsing for models
-
Clemens Kofler
I think I've once seen this in a plugin and I didn't like it. Model.find makes it really clear what's going on (i.e. finding an object) where Model[] (IMO) doesn't. It's a mere shortcut where you give up clarity for brevity and I don't like it, sorry.
-
José Valim
I agree with Clemens!
-
Josh Susser
Another -1 here. I've taken to using the [] for working with models in a certain way. Like the Setting class can interact with its settings using Setting[:foo] and Setting[:foo] = 17. I'd rather retain that flexibility than save a few characters and give up clarity.
-
Alex MacCaw
-1 It wouldn't work with associations either
-
Pratik
- State changed from new to wontfix
