Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
mypage.html.erb:

<div id="div-id"></div>
<div id="html-specific-div-id"></div>

mypage.iphone.erb:

<div id="div-id"></div>


rjs/update.html.rjs:

#TODO duplicated with update.iphone.rjs
page.replace_html 'div-id', :text => 'Wibble'
#END TODO
page.replace_html 'html-specific-div-id', :text => 'This update only occurs on the html-format version of mypage'


rjs/update.iphone.rjs:

# this is only one line but in my real source, there are about 20 lines.
#TODO this is duplicated in update.html.rjs:
page.replace_html 'div-id', :text => 'Wibble'
# END TODO