search for: krommenaa

Displaying 6 results from an estimated 6 matches for "krommenaa".

Did you mean: krommenaas
2006 Mar 02
3
How to identify the browser?
I need to generate some browser-specific code; can I identify which browser is being used from within my RoR code? -- Posted via http://www.ruby-forum.com/.
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/.
2006 Feb 21
5
how to include an html file?
I have a bunch of html files with partial page content. I''d like to be able to include the content of these files in my RoR views without having to change or rename them. In PHP I''d simply use include("file.html"); What is the RoR equivalent of this? render_file insists on it being an rhtml template, and render_partial requires me to rename the file. Ideally, I
2006 Mar 07
1
Access flash from a model class?
I have a method that returns either a comment stored in the flash (if it exists) or a new comment. It works when I put it in my application controller: def preform_comment if flash[:badcomment].nil? comment = Comment.new return comment else return flash[:badcomment] end end However it would be cleaner to put this in the Comment model, so I tried: def
2006 Feb 28
1
Can I let routes.rb take precedence over file names?
I''d like Rails to intercept the url''s of html pages in a certain directory so I can embed them in my site. I put them in public/pages and tried to catch them with a route like map.connect ''pages/:pagename'' However this only works if the file does not exist; e.g. "pages/test.html" will only be routed if that file doesn''t exist,
2006 Mar 07
2
redirect after validation
I have a difficulty with something that makes me think I don''t understand an aspect of Rails what. I''ve made a sort of blog site, and under each article I show the comments and a comment form. The comment model validates whether the user has entered his name. When he hasn''t, I want to send him back to the form with his comment text still there. In the comment/create