Verbose Logging

software development with some really amazing hair

T + S G I F R

Articles tagged with "inheritance"

respond_to With respond_glue: Override respond_to

· Posted in Programming
So check this: you have a nice little Rails app. You have some stuff for a JSON API type system. You've got an STI setup with the Widget model class and the more concrete FancyWidget and WeirdWidget classes. You've got a WidgetsController, and the corresponding FancyWidgetsController and WeirdWidgetsController Yay. It works. You can deal with both types of Widgets using JSON. Now you need an HTML interface to it. Fine, you can just throw in a fo…