11175
(-- --)
May 7, 2008, 2:38pm
1
Newbie to Ruby, working on examples Agile Development with Rails2.
<ul>
<li>Addition: <%= 1+2 %> </li>
<li>Concatenation: <%= "cow" + "boy" %> </li> 1.hour.from_now
<li>Time in one hour: <%= 1.hour.from_now %> </li>
this code simplly prints like this
Addition:
Concatenation: 1.hour.from_now
Time in one hour:
dynamic code is not displayed. I don't understand what was the problem.
I restarted the server for serverl times, but no use.
Please help
I just ran your code snip and it worked fine for me. What is the name of the your view?
11175
(-- --)
May 8, 2008, 4:41am
3
James,
name of my view is hello.rhtml.
James Mitchell wrote:
11175
(-- --)
May 8, 2008, 6:17am
4
Any one got this problem ?
radar
(Ryan Bigg)
May 8, 2008, 6:26am
5
Please paste your code exactly how you have it.
I’m thinking the 1st and 3rd don’t have the = with them.
radar
(Ryan Bigg)
May 8, 2008, 6:40am
6
Before you said the second one worked, and now you said it hasn’t.
Which is it?
11175
(-- --)
May 8, 2008, 6:58am
7
Hi Ryan,
My hello.rhtml code is like this.
<li>Addition: <%= 1+2 %> </li>
<li>Concatenation: <%= "cow" + "boy" %> </li>
<li>Time in one hour: <%= 1.hour.from_now %> </li>
and the controller class is say_controller.rb
class SayController < ApplicationController
def hello
end
end
and if i try to execute the code in using this URL
http://localhost:3000/say/hello
the output of the code is
Addition:
Concatenation: 1.hour.from_now
Time in one hour:
Why it is not executing the scriptlet code.
-Vijay
Vijay,
It looks like you are typing things in the email. You should copy and paste everything, because you are making transcription errors in preparing the emails.
Also, do a "view source" in the browser and paste that.
11175
(-- --)
May 8, 2008, 7:28am
11
Hi George Bailey,
Here is my view source code from IE 6.0
<ul>
<li>Addition: <%= 1+2 %> </li>
<li>Concatenation: <%= "cow" + "boy" %> </li> 1.hour.from_now
<li>Time in one hour: <%= 1.hour.from_now %> </li>
-Vijay.
11175
(-- --)
May 8, 2008, 7:45am
12
Sumesh,
Tried with the below code
Addition: <%= 1+2 %>
Concatenation: <%= "cow" + "boy" %>
Time in one hour: <%= 1.hour.from_now %>
output is
Addition: Concatenation: Time in one hour:
Vijay.
11175
(-- --)
May 8, 2008, 8:46am
13
All,
Anyone having the similar issue.
Vijay
11175
(-- --)
May 8, 2008, 9:46am
14
I WAS ABLE TO SEE THE VIEW SOUCE COD AS
Addition: <%= 1+2 %>
Concatenation: <%= "cow" + "boy" %>
Time in one hour: <%= 1.hour.from_now %>
BUT THE output is
Addition: Concatenation: Time in one hour:
Any one got this kind of issue.
11175
(-- --)
May 8, 2008, 10:21am
15
it's working now, i have just created another view, it's working fine.
Thanks one and all...