I have a site that calls for multiple content areas on a screen. In
order to remain DRY I wanted to create a helper that helped reduce the
markup.

At a high level I have a helper method that creates an instance of a
ContentBlock class and calls render on it. I want to render everything
inside the block passed to the helper method in the context of
ContentBlock, so that I can do something like

content do |c|
  c.tab do
    'tab content'
  end

  c.tab do
    'other tab content'
  end
end

Right now when I do what I have posted in the gist below I get the
following error:

undefined method `safe_concat' for nil:NilClass, I'm assuming that is
because it tries to buffer the template code and execute it in the
context of my content block class.

Here is the gist of what I am currently have: https://gist.github.com/1030466
Here is a mockup of the final product: http://imgur.com/nRVqI

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to