lib/volt/models/params.rb in volt-0.3.7 vs lib/volt/models/params.rb in volt-0.3.8

- old
+ new

@@ -1,14 +1,15 @@ +require 'volt/models/params_array' + # All url related data is stored in params. This includes the main uri # in addition to any query parameters. The router is responsible for # converting any uri sections into params. Sections in the uri will # override any specified parameters. # # The params value can be updated the same way a model would be, only # the updates will trigger an updated url via the browser history api. # TODO: Support # for browsers without the history api. - class Params < Model def initialize(*args) super(*args) end @@ -61,7 +62,11 @@ $page.params.trigger!('child_changed') if Volt.client? end def new_model(*args) Params.new(*args) + end + + def new_array_model(*args) + ParamsArray.new(*args) end end