Sha256: b614c310c71da5c4f4e8d5b3a940502c58fbd0696c2b0535b2605990ca0262cd

Contents?: true

Size: 247 Bytes

Versions: 5

Compression:

Stored size: 247 Bytes

Contents

class BookGridWithMassAssignmentSecurity < Netzke::Basepack::Grid
  def configure(c)
    c.model = "Book"
    # Only allow assigning those attributes that are accessible for the :user role in the Book model
    c.role = :user

    super
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
netzke-basepack-0.8.4 test/basepack_test_app/app/components/book_grid_with_mass_assignment_security.rb
netzke-basepack-0.8.3 test/basepack_test_app/app/components/book_grid_with_mass_assignment_security.rb
netzke-basepack-0.8.2 test/basepack_test_app/app/components/book_grid_with_mass_assignment_security.rb
netzke-basepack-0.8.1 test/basepack_test_app/app/components/book_grid_with_mass_assignment_security.rb
netzke-basepack-0.8.0 test/basepack_test_app/app/components/book_grid_with_mass_assignment_security.rb