search for: eleo

Displaying 12 results from an estimated 12 matches for "eleo".

Did you mean: elem
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 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
2006 Jul 18
9
Displaying HTML pulled directly from a database
How can I get RoR to display html pulled directly from a database, without converting the tags. (e.g. if "<h1>Hello</h1>" is stored (as text) in a database, how can I get RoR NOT to corvert it to "&lt;h1&gt;Hello</h1>", but instead to just pass the tags along so that "Hello" displays in bold. I''m sure it''s just a
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
2006 Mar 30
13
need an Ruby on Rails IDE
Hello everybody, I''m a new member on Ruby on Rails. I''m friendly on using Microsoft Visual Studio (VS) IDE. The VS IDE supports for Intellisense coding (that mean it will automatically display a list of member variables or functions for a class, struct, union, or namespace; the names and types of parameters required by a function or attribute; and the complete declaration for
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 Mar 27
2
Trouble with rendering partials
This only works when the partial name matches the object name; if I change "threadtop" to "thread" then it works fine. Is this normal? I get the following error otherwise: "undefined local variable or method `thread''" index.rhtml --- <% for @thread in @threads %> <%= render :partial => ''threadtop'', :object => @thread
2006 Aug 15
66
What are the cons of using rails?
Performace hits? Integration with existing applications? Security? Bugs? Memory use? -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jul 25
1
How do I validate using associated objects?
This doesn''t make any sense to me anymore. I have an Upload that belongs_to a Comment. Within my Upload model I expect to be able to access the associated comment with comment.foo. I can only seem to do this AFTER validation. I''m assuming before_create takes place between validation and updating the database, because when I try to access comment.foo within the validate