Jose vicente Ribera pellicer wrote:
>> Are you
>> seriously trying to put PHP code in your views? Or do you want to port
>> the php to ruby?
>>
>> SH
>
>
> I want to port the php, but i am a begginer developper and i only
> program with RoR. I don't know how to port it to my rails application :(
I try with this:
<%- if(isset($_POST)): echo("Value is: ".$_POST["input-rating"]); endif
%>
but firefox shows me this error:
SyntaxError in Videos#show
Showing videos/show.html.erb where line #17 raised:
compile error
/Users/jose/mimandote.com/app/views/videos/show.html.erb:17: syntax
error, unexpected tGVAR
_erbout.concat(( if(isset($_POST)): echo("Value is:
".$_POST["input-rating"]); endif ).to_s); _erbout.concat "\n"
^
/Users/jose/mimandote.com/app/views/videos/show.html.erb:17: syntax
error, unexpected ')', expecting kEND
_erbout.concat(( if(isset($_POST)): echo("Value is:
".$_POST["input-rating"]); endif ).to_s); _erbout.concat "\n"
^
/Users/jose/mimandote.com/app/views/videos/show.html.erb:35: syntax
error, unexpected $end, expecting ')'
Extracted source (around line #17):
14: <input name="submit" type="submit" value="Votar" />
15: </form>
16:
17: <%= if(isset($_POST)): echo("Value is: ".$_POST["input-rating"]);
endif %>
18:
19: <script language="javascript">
20: var pValue = '<?= $_POST["input-rating"] ?>';
:(
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---