Displaying 20 results from an estimated 8000 matches similar to: "Displaying HTML pulled directly from a database"
2006 Jul 14
6
Using RoR to produce .xhtml files
How can I manipulate RoR to produce an .xhtml file from the view
template(s)? I see how I can use layouts and paritals to efficiently
produce the content and tags that I need, but how can I get the actual
file that''s produced to be named with the .xhtml suffix, (rather than
*.htm, as it currently is)? [Note: I never thought the suffix was all
that important, but evidenly Mozilla
2006 May 09
4
Ajax calls and characters encoding (accents)
Hello, my application controller defines
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=ISO-8859-1"
end
Everything is fine and accents are rendered correctly in the browser.
However, when I call a controller/action from Ajax (Prototype), the
charset is not taken in account and accents are garbage displayed (''?''
2006 Jan 30
5
a RJS problem/patch
Hi,
add_rjs_to_action_view.rb of javascript_generator_templates
doesn''t work with setting Content-Type in a controller.
(e.g.) http://wiki.rubyonrails.org/rails/pages/HowtoSetDefaultEncoding
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=utf-8"
end
end
I
2006 Jul 18
4
Limiting markdown/textile
I''m using RedCloth for a forum type app. I want users to have control
over the look of their posts, but within limits. For example, I don''t
want them to be able to include images or use header tags. The RedCloth
documentation is pretty thin and I don''t feel it''s very explanatory.
I''m wondering if there''s any easy way to do this? Or do I
2006 Jan 25
4
html special char conversion
I''ve stucked to such problem:
I have html entities in database, after using scaffold I''ve got these
chars not converted (I have strictly " and & in page source). It is what
I need, but after making ./script/generate scaffold modelname
controllername (recreating controller) I''ve got all special chars
converted into entities like (" and others). How can
2006 Aug 15
1
Writing static HTML?
I have a forum but, unlike most forum, posts are deleted periodically.
I''d like the administrator to optionally choose whether or not he wants
deleted posts archived (removed from the database but stored on the
fileserver) so that he or she can do whatever with the posts.
When a post is deleted, I''d like it to be saved as static HTML and have
the appearance of however it
2006 Jan 26
2
Newbe Question: Character Encoding
I have to present german umlaute as "?" on my webpage. When writing the
text within the view, everything is fine - the characters are presented
correctly. When I declare variable within the controller (e.g. via flash
or as a list of values for a listbox) the text is displayed with the
umlaute replaced by strange characters.
I assume I have to adjust the character encoding somewhere.
2006 May 08
2
How to set the default language in GetText?
How to set the default language in GetText?
The default language of GetText is en,and I want to change it to another
language,and also keep the ability to change to any other languages by
just click the according href.
Currently I use:
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html;
2007 Feb 28
1
One page in app keeps rendering as text/plain
Here''s what I get from wget -S:
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Wed, 28 Feb 2007 15:52:06 GMT
Server: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a
mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.4
FrontPage/5.0.2.2635.SR1.2 mod_ssl/2
.8.28 OpenSSL/0.9.7a
#<#<Class: 0x2a96d0b978>:0x2a96d0b928>Content-Type:
2006 Feb 25
5
Setting character encoding - do I do it with Rails or lighttpd?
I have a page which validates "tentatively," because the validator
uses the default character encoding. None was specified apparently,
so it falls back to UTF-8. How and where do I specify the character
encoding?
Pat
2006 Mar 05
5
special characters?
I''m not sure if this is something in Rails or MySQL, but characters like
? are showing up funky in my app. I see ''?'' in the DB using a query
browser, but in the app it shows up as ''A1/4.'' Do I need to use another
charset or something?
--
Posted via http://www.ruby-forum.com/.
2006 Sep 19
9
Very strange: Umlauts (äöü) aren't displayed correctly in
Hi all
Take a look at the following video, please... I just'' can''t help me
anymore...
http://josh.ch/files/temp/rails_problem.mov
I''m sorry for the bad quality, it''s just a demo of Snapz Pro X 2... ;-)
But I hope you''ll see enought...
Thanks for any help.
Josh
--
Posted via http://www.ruby-forum.com/.
2006 Mar 22
9
Display problem
hey guys,
Does anyone know why the french letter "?" is displayed as a question
mark "?" inside an <h1> tag ?
--
Posted via http://www.ruby-forum.com/.
2007 Sep 02
21
ferret for professionals
Hello,
I''m trying to setup ferret search engine(what i did successfully for
searching english phrases, words)
But i doesn''t work for UTF-8 symbols!!!
I tried to find the solution for this problem:
1) i add to enviroment.rb followinf lines:
ENV[''LANG''] = ''de_DE.UTF-8 at euro''
ENV[''LC_TIME''] = ''C''
2006 Mar 30
2
How do I format text before saving it?
I tried to use a before_save and use simple_format, it returns and
undefined method error. Can I even use these methods within a model? I
tried to use auto_link and it failed too. What am I doing wrong?
Furthermore, would it be recommended I format text before saving it to
the database? Advantages or disadvantages?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 19
5
Apache, Rails, FastCGI, Ruby, slow
I''m running Windows XP Pro on a not-so-new machine, Pentium 4 2.4GHz
with 512 RAM. I''ve got Apache 2 installed and I''m using FastCGI to run
Typo in development mode while I design a theme for it. But it''s slow,
very slow.
Inconsistently slow. If I reload a page, sometimes it happens pretty
quickly. Sometimes it takes more than a minute. Sometimes it
2012 Feb 06
2
creating more vectors out of one
Dear R-helpers,
I have got a vector which looks like the following:
apkz <- c(1,2,3,4,5,6,1,1,2,1,2,3,4)
now I am trying to find a way to automatically create several vectors,
each starting with the number 1, namely:
First vector
1 2 3 4 5 6
Second vector
1
Thrid vector
1 2
Fourth vector
1 2 3 4
Does anyone know how to do that?
Thank you very much for your help in advance!
2007 Mar 27
7
Eager loading not working well for me
Man my app is causing me so much grief lately.
Okay let''s say I have:
class Discussion
has_many :posts
end
class Post
belongs_to :discussion
acts_as_tree
end
Then let''s say I grab a discussion object and try to eager load all of
its posts:
discussion = Discussion.find(:first, :include => [:posts])
Seems simple enough and it grabs an entire tree of posts. However:
2006 Jul 22
7
Validation with has_many
I have two problems. I have a comment that has_many uploads. Before
saving the comment, I want to be sure that the upload(s) has passed
validation, but I also need to validate in other ways. For example, I
do not want to save the comment if there is no comment or upload. Or, I
do not want to save the comment if the image has been uploaded
previously (comparing md5s with past upload md5s
2006 May 12
5
Bumping threads in a forum-type app
I have a forum-type application. The Board model has many comments, the
Comments model acts as a tree. So I have a board with multiple
comments, some comments are parent comments and there are comments that
belong to a parent comment, making up a thread.
Like most forums, I want it so that threads are sorted based on the date
of their last comment. But I have no idea how to specify this in