[Rails] Re: formats in action view base

2012-09-16 Thread 7stud --
Also, p Dog.ancestors --output:-- [Dog, Cat, Animal, Object, Kernel, BasicObject] -- 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

[Rails] Re: formats in action view base

2012-09-15 Thread John Merlino
Let's say I call LookupContext with a details hash consisitng of a format. Here's the sequence as I understand it: 1) First lookup_context.rb is loaded, which means the macros are called immediately. The register_detail macro, accepts a symbol and block. We pass it a symbol :formats and a block

[Rails] Re: formats in action view base

2012-09-15 Thread 7stud --
class Animal def greet puts 'hi' end end class Dog Animal def greet super end end d = Dog.new d.greet --output:-- hi module Animal def greet puts 'hi' end end class Dog include Animal def greet super end end d = Dog.new d.greet --output:-- hi

[Rails] Re: formats in action view base

2012-09-15 Thread 7stud --
7stud -- wrote in post #1076203: Modules that are included are inserted into the inheritance chain. Where in the chain? module Cat def greet puts 'meow' end end class Animal def greet puts 'hi' end end class Dog Animal include Cat def greet super