[OT] Markaby trunk and Rails ivars
Geoffrey Grosenbach
boss at topfunky.com
Fri Nov 3 12:42:12 EST 2006
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
More information about the Camping-list
mailing list