Skip to content

Commit

Permalink
delegating #request and #config to parent_controller now, we don't wa…
Browse files Browse the repository at this point in the history
…nt that around.
  • Loading branch information
apotonick committed Feb 4, 2011
1 parent b224735 commit c5785b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions CHANGES.textile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
h2. 3.5.0

h3. Changes
* Deprecated @opts, use #options now. This should be the prefered way of parameter exchange with the outer world.
* #params is now delegated to @parent_controller.
* Deprecated @opts, use #options now.
* Added state-args. State methods can now receive the options as method arguments. This should be the prefered way of parameter exchange with the outer world.
* #params, #request, and #config is now delegated to @parent_controller.
* The generator now is invoked as @rails g cell ...@
* The `--haml` option is no longer available.
* The `-t` option now is compatible with the rest of rails generators, now it is used as alias for `--test-framework`. Use the `-e` option as an alias of `--template-engine`
Expand Down
5 changes: 1 addition & 4 deletions lib/cell/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def render_state(state, *args)


module Metal
attr_internal :request
delegate :session, :params, :to => :parent_controller
delegate :session, :params, :request, :config, :to => :parent_controller
end


Expand All @@ -53,8 +52,6 @@ module Metal

def initialize(parent_controller, options={})
@parent_controller = parent_controller
@_request = parent_controller.request # DISCUSS: save request only?
@_config = parent_controller.config.dup # FIXME: lazy!
@options = options
@opts = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :options)
end
Expand Down

0 comments on commit c5785b5

Please sign in to comment.