lib/netzke/grid/base.rb in netzke-basepack-1.0.0.0 vs lib/netzke/grid/base.rb in netzke-basepack-1.0.0.1
- old
+ new
@@ -52,11 +52,11 @@
#
# Array of form items. This may define arbitrary form layout. An item that represents a specific attribute, should
# be specified as either a symbol (attribute name), or a hash containing the +name+ key pointing to the attribute
# name, as well as additional configuration keys.
#
- # class Users < Netzke::Basepack::Grid
+ # class Users < Netzke::Grid::Base
# def configure(c)
# super
# c.model = User
# c.form_items = [
# {
@@ -80,20 +80,20 @@
# [scope]
#
# A Proc or a Hash used to scope out grid data. The Proc will receive the current relation as a parameter and must
# return the modified relation. For example:
#
- # class Books < Netzke::Basepack::Grid
+ # class Books < Netzke::Grid::Base
# def configure(c)
# super
# c.model = Book
# c.scope = lambda {|r| r.where(author_id: 1) }
# end
# end
#
# Hash is being accepted for conivience, it will be directly passed to `where`. So the above can be rewritten as:
#
- # class Books < Netzke::Basepack::Grid
+ # class Books < Netzke::Grid::Base
# def configure(c)
# super
# c.model = Book
# c.scope = {author_id: 1}
# end