lib/apotomo/widget.rb in apotomo-1.0.0.beta1 vs lib/apotomo/widget.rb in apotomo-1.0.0.beta2
- old
+ new
@@ -68,10 +68,12 @@
@visible = true
@version = 0 ### DISCUSS: neeed in stateLESS?
@cell = self ### DISCUSS: needed?
+ @params = parent_controller.params.dup.merge(opts)
+
run_hook(:after_initialize, id, start_state, opts)
end
def last_state
action_name
@@ -86,11 +88,11 @@
def ivars_to_forget
unfreezable_ivars
end
def unfreezable_ivars
- [:@childrenHash, :@children, :@parent, :@parent_controller, :@_request, :@_config, :@cell, :@invoke_block, :@rendered_children, :@page_updates, :@opts,
+ [:@childrenHash, :@children, :@parent, :@parent_controller, :@_request, :@_config, :@cell, :@invoke_block, :@rendered_children, :@page_updates, :@opts, :@params,
:@suppress_javascript ### FIXME: implement with ActiveHelper and :locals.
]
end
@@ -248,10 +250,10 @@
end
### DISCUSS: use #param only for accessing request data.
def param(name)
- params[name]
+ @params[name]
end
# Returns the address hash to the event controller and the targeted widget.
#