You can clone with
HTTPS or Subversion.
I have two questions:
First, in the README, it says that Rails 2.3 is supported via version 3.3.9. Is support for Rails 2.3 going to be available in future or are we stuck at 3.3.9 and no bug fixes or improvements?
Second, the current problem: A simple setup such as below gives me wrong number of arguments (0 for 1) :
wrong number of arguments (0 for 1)
class CartCell < ::Cell::Base
puts args[:param_one] # does not even get here.
Cell view cart.html.haml:
Testing Testing Testing
Call to render the cell in show view of some X controller:
= render_cell :cart, :something, :param_one => "One"
Partial stack trace:
Note cartcell.rb:2:in 'something' is the line def something(args) in CartCell.
Is this a known bug or am I doing something horribly wrong?
PS I also tried the call like so but no joy:
= render_cell :cart, :something, "Pass param directly, no options hash magic"
Oh... I'm not sure if cells 3.3 (Rails 2.3) supports state-args at all... That answers your first question: So far I dropped 2.3 development since nobody asked for it and it is quite a bit of work. Are you tied to Rails 2.3?
Yes, tied to 2.3 unfortunately.
Well I can take a look at how easy it is to backport stuff but for me personally it is a bit of waste of time to work on old code. Sorry dude ;)
Just reviving this. I'm stuck on Rails 2.3 and needed to upgrade cells from a plugin version I was using to the gem (3.3.9) to avoid deprecation warnings triggered by the plugin in Rails 2.3.6+.
I used to do this:
@variable = @opts[:variable]
render_cell :model_name, :my_cell, :variable => whatever
I get this error now:
The error occurred while evaluating nil.
I'm confused as to why this functionality (passing in variables) seems to have been either removed or is buggy? Could you let me know how I'm supposed to access variables now? I presume access changed somewhere along the line. Alternatively, is there a gem version that doesn't trigger the deprecation warnings (load_paths and returning) but still allows the old functionality?
Turns out that I wasn't calling render in one of my cells. Slightly obscure :)
Still, @bikramwp, you can use the method I outlined above to send arguments into a cell render and access them.