Passing variables in to page objects

I am very new to Ruby and Rails and have the following question.

Can you pass a ruby variable into a page object?

I am using some Ajax and am using the following code in my .rjs file

page[:status].visual_effect :highlight

This works when I have one instance of “id=“status”” as an id in my
html, but I have several that correspond to “id=“status_<%= status.id
%>”” and I thus need to make the method I am passing into my page[]
object be a variable.

(I hope I didn’t get any terms wrong, if so, I apologize)

Hi Michael M.

Dont know your code But you can do as some think similar to  the 

below code(In rjs)

status = “status#{status.id}”
page[:status].visual_effect :highlight

Sijo

Thank you. It worked with the following mod:

status = “status#{status.id}”
page[status].visual_effect :highlight

I took the colon out of the “status” in the page object. Thanks again!

Sijo k g wrote:

Hi Michael M.

Dont know your code But you can do as some think similar to  the 

below code(In rjs)

status = “status#{status.id}”
page[:status].visual_effect :highlight

Sijo