This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Include this module to Rails controllers using ActiveScaffold to be able to receive | |
# form parameters in normal Rails format ( {... model: {...}}) and change them to the | |
# format needed by AS ({... record:{...}}) | |
# ActiveScaffold also wants to see associations by name (xxxx) and not xxxx_id | |
# The module adds do_update and do_create methods, so these should not be overridden | |
# in the controller (unless the same functionality is added). Instead, you can override | |
# my_do_update and my_do_create, which are called by do_create and do_update just before | |
# they call the AS methods. | |
# The model name is determined from the controller class in @my_model_sym, which can be | |
# overridden if the model name should be something else. |