Right from the documentation, you can include locals in partials like this example:
You can also pass in other instance variables to be used in your template as:
Rabl::Renderer.new('posts/show', @post, :locals => { :custom_title => "Hello world!" })
Then, in your template, you can use @custom_title as:
attribute :content
node(:title) { @custom_title }
This allows you to use something like:
Controller:
Rabl::Renderer.new('user/show', @user, :locals => { :posts_category => "examples" })
Partial:
attribute id
node(:posts) { |user| user.posts.by_category(@posts_category) }