logo       

[OT] Markaby trunk and Rails ivars: msg#00001

lang.ruby.camping.general

Subject: [OT] Markaby trunk and Rails ivars

Can someone explain the new Markaby syntax to me? I'm using Markaby
as a Rails plugin, fetched from the trunk.

I'm losing my instance variables somehow (@thing is always nil):

class ThingsController < ApplicationController
def index
@thing = "Bacon of the chunky variety"
end
end

# app/views/index.mab
h1 { "You should see a thing here:" }
p { @thing }


And I get a NoMethodError when trying to get at it with the thing()
method, as mentioned in the README.

I can, however, get to the instance variable like this:

@thing = @helpers.controller.assigns['thing']


What am I doing wrong?

Geoff


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise