This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit f4f6e57e8c2a446a4a600576f0caf0fb8921ba13
tree e3541a545c85cc00a5182532b4c2b6d9376c815d
parent 89eec91e670ae267cd88b2b3555bfefe527f0eaa
tree e3541a545c85cc00a5182532b4c2b6d9376c815d
parent 89eec91e670ae267cd88b2b3555bfefe527f0eaa
... |
... |
|
... |
... |
|












Hey.. any strong example, where I could use metaclass in a rails app?
It’s really useful when it comes to metaprogramming in Ruby.
Jay Fields has a blog post on the subject. He explains some pros and cons of this approach.
Why isn’t rails using the facets gem?
Why isn’t facets using activesupport? :)
@anildigital: I’ve you’ve never felt you needed it, you probably don’t :)
I wanted to be a bit more helpful above but I was posting from my iPhone. why the lucky stiff has a great post about metaclasses here. The
metaclassmethod is a great help for handling per-object things in your app. It can be over-used, but it can also help you do fun things like this.Actually, the example I posted is just a convoluted example of something that can be done a million other ways. The good thing is that once you get a handle on the notion of metaclasses and such, you’ll know when and when not to use it. :)
glad this has finally been folded in so everyone does have to define this method themself
I liked this snippet best the first time I saw it….. when it was on the back of _why’s Ruby Kaigi 2007 t-shirt. or in metaid.rb