similar to: improving on: truncate(..) + rendered text ?

Displaying 20 results from an estimated 200 matches similar to: "improving on: truncate(..) + rendered text ?"

2011 Jan 15
3
respond_with javascript
My ajax stopped working when I switched to using respond_with. For my Votes, I have the create action and the corresponding create.js.erb, and respond_to :html, :js, :xml in the controller. Heres the log when I try and create a vote: Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan 14 20:46:36 -0800 2011 Processing by VotesController#create as */* Parameters:
2006 Jan 23
2
problem with options_for_select
Hi All, I am having a little difficulty using the options_for_select forms helper method. I have a form for an active record object book, which belongs to a publisher. Using the options_for_select is working fine as far as creating the various options, but it will not output the "selected=''selected''" bit of html needed to identify which publisher is
2007 Oct 28
6
high cpu load
Hi all, My mongrel server (1.0.3), with a very low usage, is taking more than 10% of cpu usage all the time (no background tasks were defined by me). This is very annoying and it is preventing me from being able to thing about good cluster configuration. Any idea on why this is happening? cheers and regards, Danilo -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Sep 18
2
RedCloth !image! bug with filter_html
Hi all! I am trying tu set up RedCloth for user-submitted comments. And here is my problem. The :filter_html option just breaks images :-( For example, if I try in irb: string= "Some textile !agif.gif! and textile again" RedCloth.new(string, [:filter_html, :filter_styles]).to_html(:textile) I get: NoMethodError: You have a nil object when you didn''t expect it! The error
2007 Nov 29
27
Strip & Sanitize BEFORE saving data
So I''ve googled my brains out, and I see a lot of talk about TextHelper for views, but next to no discussion about cleaning text _before_ it is saved. I figured this had to be asked 4 zillion times, but I''m not finding anything concrete/obvious. Using h is fine as a safety catch, but that alone is not acceptable to me as the means of diffusing the impact of HTML or JS
2008 Jan 15
0
Problem with ruby-debug and rspec
So i''ve been getting this same thing with both rspec 1.1.1 and now with 1.1.2. ruby-debug works with i''m in the application code, but not when i''m in the ''spec'', or spec helper methods i''m loading. Basically any command which should normally work like p, or pp, gets passed through to a method_missing. I''m kind of stumped on this
2007 Feb 17
0
Truncate and textilize
Hi, this is probably an obvious question, but I want to textilize and truncate the same thing. Nesting them in parenthesis didn''t seem to work for me. Here is what I have: <%= truncate(friend.about_me, length = 140, truncate_string = "...") %> How do I get it to recognize textile as well? Thanks! Dave -- Posted via http://www.ruby-forum.com/.
2008 May 20
6
[Bug 16031] New: nv11 + KDM/KDE: No UI elements/text rendered
http://bugs.freedesktop.org/show_bug.cgi?id=16031 Summary: nv11 + KDM/KDE: No UI elements/text rendered Product: xorg Version: unspecified Platform: x86 (IA32) OS/Version: All Status: NEW Severity: normal Priority: medium Component: Driver/nouveau AssignedTo: nouveau at lists.freedesktop.org
2008 Feb 01
4
How to sanitize _before_ going into the database?
I use a call to the sanitize method every time I render some user input, but it would be much nicer if I could clean it up once before putting it into the database and avoid having to call the (relatively expensive) sanitize every time I render a page. My first thought was to just add something like: def message=(x) self[:message]=sanitize(x) end However, the sanitize helper cannot be called
2006 Sep 26
12
resource_feeder feedback
Let me apologize in advance as this is a topic that I feel passionate and opinionated about. If I''m coming on too strong, please forgive me. === Be opinionated=== My first piece of advice is simple: be opinionated. Change the method name to simply <feed_for>. Have it default to doing the right thing. Perhaps give an option to change the default feed format, but default to
2012 Jan 25
4
serializable_hash and serializable_add_includes
I''m trying to write a helper method similar to attr_accessible but instead it will be used to whitelist which attributes are available for serialization (attr_serializable). My first attempt at this was to override serialized_hash and modify the :only option to include nothing but serializable attributes. I''m facing a problem when nested models are ''included''
2007 Sep 28
0
Trouble with Team Fortress 2
Greetings fellow Wine users, ????????I saw a prior message in the archives from 'darckness cyrix12 at cox.net' mentioning a problem trying to run TF2. I'm running on the latest git, or wine-0.9.45-426-g71d70f0, and appear to be having a similar problem. I have a gzip of a log with WINEDEBUG=+tid,+seh,+loaddll,+d3d,+d3d_shader, +d3d9 [1], running Steam and attempting to launch TF2.
2007 Mar 06
59
Memory leaks in my site
Hi all, My environment is ruby-1.8.4, rails 1.2.2, mongrel 1.0.1, linux 2.6. Now, i have a problem on memory leaks with mongrel. My site is running 5 mongrel processes on a 2G RAM machine, the memory of each process grows from about 20M to about 250M, but it never recover to the initial 20M, so i had to restart the mongrel processes once per day. The load is about 1M hits per day. Waiting for
2006 Nov 16
0
helpers not rendered in views?
https://rubyforge.org/tracker/index.php? func=detail&aid=6713&group_id=797&atid=3150 I''m not sure if this is true of all helper methods but it is for the following. In this case the forn_remote_tag is rendered as an empty line. Apprently helpers are not rendered in view tests... template _xyz: <div> <% form_remote_tag :update => "some_div", :url
2006 Aug 17
1
How to know in the layout what view was rendered?
Hi, Is a way to know in the layout what view was rendered? -- Edgar Gonz?lez Gonz?lez E-mail: edgargonzalez@gmail.com --
2006 Jun 20
0
No opening form tag in rendered HTML
I cannot get my form to submit for my simple blog site (based on the "How to Build a Blog Engine in 15 Minutes" presentation) Any ideas? Thanks, Tom ---------------------------------------------------------------------------- Here is my code: #Post controller class PostsController < ApplicationController def index list render :action => ''list'' end
2006 May 16
1
Saving a rendered page as a file
Is there any way to save a rendered page as a *.html file? Thanks.
2006 May 31
1
embedding link_to''s as part of rendered text.
Hi, I''d like to be able to do a database query, fetch some text, and add an ''Accept Request'' and ''Deny Request'' within the text. Both of these would be links so if the user were to click on them, they would essentially send POST requests back to the server. Since this is dynamic, I wanted to know the safest/best approach in embedding these links
2006 Jan 11
1
ActionMailing rendered pages
Hi, I am having problems figuring out how to send properly html pages attachments which are some other application''s components rendered pages. It seems, that when I use something like this: part :content_type => "text/html", :body => render_message("optestweek", :week => week, :profiles => profiles ) I have no more access to methods like
2006 Jan 13
0
Layout not rendered when render_component used
Hi I''ve got a login action that handles authenticating users, setting cookies and, via its view, displaying an HTML snippet containing a form with username and password fields. It''s called from the main application.rhtml layout so I don''t need to have a seperate page (away from the main site) with a login form. My user model is more-or-less the same as in the Agile RoR