Ticket #51 (closed defect: fixed)

Opened 23 months ago

Last modified 22 months ago

Rails helpers cannot access ivars

Reported by: tsg21 Owned by: tec
Priority: minor Milestone:
Component: lib Version:
Keywords: ivars Cc:

Description

If we're going to allow people to continue using @ prefixed ivars, then there's still a bit missing - Rails helpers need their ivars setting as well.

Test case and fix attached.

Attachments

testcase.patch (1.5 kB) - added by tsg21 23 months ago.
test case
fix.patch (430 bytes) - added by tsg21 23 months ago.
fix

Change History

Changed 23 months ago by tsg21

test case

Changed 23 months ago by tsg21

fix

Changed 23 months ago by tec

  • status changed from new to assigned

Changed 22 months ago by srackham

I can confirm this patch has fixed the @helpers.params and @helpers.session instance variables evaluating to nil (Rails 1.2.1, Markaby 0.5, Ruby 1.8.5) -- many thanks for the fix.

Changed 22 months ago by srackham

After patching you don't even need the @helpers. qualifier session[] and params[] seems to work fine.

Changed 22 months ago by tec

  • status changed from assigned to closed
  • resolution set to fixed

Thanks for catching this; sorted out in [104].

Note: See TracTickets for help on using tickets.