Hacker News new | past | comments | ask | show | jobs | submit login

    # config/initializers/disable_mass_assignment.rb
    ActiveRecord::Base.send(:attr_accessible, nil)

    # app/models/some_model.rb
    class SomeModel < ActiveRecord::Base
      attr_accessible :whitelisted, :attributes
    end



Applications are open for YC Winter 2021

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: