• Gistflow :: HipsterStruct - new way for creating objects in Rails

    gistflow.com 04 Dec '12, 7pm

    Looks like we are done here but there is a couple of things to discuss. First – never use this approach. It is dangerous because instance_eval allows you to call private methods which I think is very bad. But let's make one more step and make our HipsterStruct safer. To hack instance_...

  • Gistflow :: strong_parameters is not nice

    gistflow.com 23 Sep '12, 8am

    What will we get in #rails4 ? New attr_accessible in controller. def user_params params.require(:user).permit(:name, :age) end Why so LONG AND VERBOSE? You was afraid to force whitelist_attributes but now OK to force people to write 'require' 'params' 'permit' and 'def user_params' . ...