similar to: printing out text in .rhtml files

Displaying 20 results from an estimated 40000 matches similar to: "printing out text in .rhtml files"

2007 Sep 28
2
RoR uses something rather than erb or eRuby?
it seems that RoR doesn''t use erb or eRuby to generate its output for rhtml? the program erb and the description of eRuby at http://www.eruby.info both said that <% print "foo bar" %> or <% puts "hello" %> will be placed into the output... but currently for RoR, it won''t... only <%= expr %> is doing it and it cannot be print or
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other than Erubis are not loaded automatically (Haml, XMLBuilder). Either this should be fixed, or the documentation should be updated to instruct people how to use non-Erb template engines. Apparently the solution is to do something like this in merb_init.rb: ::Merb::AbstractController.register_engine
2006 Aug 18
3
equivalent of "puts" in rhtml
Hi everyone, This seems so basic, and yet I can''t quite figure it out. Say I have some code in an .rhtml document: <%= if @session[:user_id] link_to somethingA else link_to somethingB link_to somethingC end -%> Only the link to somethingC will show in the second case. I understand that the last thing returned from that else block is that last line. In php i could just add
2006 Jul 05
2
Vim and .rhtml
So is there any hope of someone creating a vim syntax file for ERb, particularly RHTML? I''ve been using mason for the filetype which is close, but imperfect. It might be a good starting point. I''m considering doing it myself, but I thought I''d check to see if anyone else was already on the job. --Greg
2006 Jun 30
2
Eruby.import -> "uninitialized constant" error
I''m working on porting a dynamic website done in PHP over to mod_ruby. I have everything set up and working nicely (I can make a .rhtml page, put ruby code between <% %> and it works etc), but when I try to use "Eruby.import" as a sort of analog to PHP''s "require_once()", I run into trouble. 1) eruby is in my cgi-bin 2) here''s a sample of
2006 Jun 22
2
eRuby/erb
Hello. Prospective Mongrel user here. Can Mongrel act as a server for eruby or erb files? Example: <html> <body> <p>The time is <%= Time.now %></p> </body> </html> Pistos
2006 Jun 04
4
eRuby & Rails: Not Compatible
I''m new to Ruby, Rails, and this list. I''ve tried searching for an answer but it all seems to be over my head. I have all the books but again they seem to leave me on my own to figure out the stuff that really matters. Where is the best place to find out the details? Exactly what are these much celebrated "naming conventions"; i.e. where do I find an exhaustive
2007 Jul 26
3
rhtml output
Just a simple question. I know what this does" <%= %> for output but what is the purpose of the negative sign in this <%= -%> in a rhtml template? -- 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,
2006 Feb 20
7
Native erb lacks -%>, where is Rails'' erb?
Native ERB in ruby, and eruby, seem to lack the -%> feature for suppressing trailing newlines. Thus erb -n script gives errors. Where is Rails ERB so I can invoke it directly? Thank you Hugh
2009 May 24
3
index.erb vs rhtml
I am a total Ruby/RoR n00b having just started reading the ''Ruby on Rails Bible'' book two days ago. I''ve been trying to work out through the introductory ''Your first ruby on rails application'' section, but I''ve run into problems already! The book goes on about creating the view templates and naming them with the *.html.erb extension, but I get
2005 Dec 27
13
<%= works, print doesn''t
In my views, for example list.rhtml, if I try: <%= "test" %> everything works fine. If I try: <% print "test" %> then instead of outputting the page, the browser displays the HTML source code. Any ideas on what my problem is? This is my first RoR app so it''s probably a stupid bug on my part, but my Google-fu isn''t powerful to track down
2006 Mar 28
6
RHTML designer
Hi I have just started playing with ROR and I think its very good. My only problem is that I am new to web development and know much abount html. I was wondering if there is any tool/plugin I could use to design rhtml pages. Regards Sandeep -- Posted via http://www.ruby-forum.com/.
2007 Jan 25
1
render rhtml templates in worker
I''m trying to make a worker that will render a large page to a file, very similar to what rails'' builtin cacheing does except with the rendering done outside of rails. The only advice I''ve found is to use ActionController::Integration::Session.new but this doesn''t seem to allow setting session variables the way the functional tests do. Is there a way to
2007 Apr 03
4
Replacing ERB with Erubis
Hey guys, I''ve been hearing a lot about erubis: http://www.kuwata-lab.com/erubis/ Especially about how much faster it is than straight ERB. In their Ruby on Rails support docs: http://www.kuwata-lab.com/erubis/users-guide.05.html#topics-rails They state that with a few added lines to your environment.rb it will replace ERB completely. I''m wondering if anyone has done this in
2005 Dec 15
2
.rhtml in the model rather than the controller
Hi, I''m developing a mini-programming language for research surveys. [code] question S1 { label: The first few questions are just to help us categorize you. label: Do you or does any member in your household work for... (MARK ONE ONLY FOR EACH.) grid { col { 1 Yes 2 No } row { 1 An advertising agency 2 A public relations company 3 A marketing research firm or
2008 Jul 23
2
difference between html.hi to evererb &rhtml
hi to everyone whats the difference between html.erb & rhtml -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2006 May 24
5
rxml vs rhtml
I have been wondering if anyone here knows which format is faster for your templates? I am curious cause in the near future I may be using some expensive scripts (timewise) and would like to try and squeak out as much performance as possible. Is Ruby like other languages (ASP classic for example) that inccur a penalty by switching between HTML and Ruby Code? Ben -- Posted via
2006 Feb 13
1
Executing ruby on rail program through address bar
I Want to run my ruby on rail application through address bar. i.e like: http://localhost/rail_program/first.rhtml. when i trying this it only executes html part but not executing rail part. Here is the code: <html> <head> <title>eruby example</title> </head> <body> <h1>Enumeration</h1> <ul> <%(1..10).each do|i|%> <li>number
2006 Feb 23
12
how to output something from within <% %> tags?
simple question: how do I output something from within <% %> tags? e.g. like ''echo'' in PHP. I thought it would be ''puts'' or ''print'' but neither seems to work. right now I always close the %> and open a <%= which is tedious. -- Posted via http://www.ruby-forum.com/.
2008 Jan 08
3
What happened to _form.rhtml partial in rails 2.0??
Just wondering if anyone could point me to a good explanation of why the latest way of doing things does not include using something like _form.html.erb partials in RESTful rails 2.0?? Why did we move away from partials, etc?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To