similar to: How about add a method to truncate a long text more smart?

Displaying 20 results from an estimated 100 matches similar to: "How about add a method to truncate a long text more smart?"

2013 Jun 15
1
A puzzle about default_scope
Hi, guys I have a puzzle about default_scope. Suppose I have two model: class User < ActiveRecord::Base has_many :blogs default_scope where(deleted_at: nil) end class Blog < ActiveRecord::Base belongs_to :user end I want to produce sqlselect blogs.* from blogs inner join users on users.id = blogs.user_id and users.deleted_at is null And the code Blog.joins(:user), which I think
2013 Feb 05
3
Truncate text
Hi Folks, Good evening, I used the code which i print below, Yes i got the result , but i need the result like this "TruncateHtml is jus....(continued)" some_html = ''<ul><li><a href="http://whatever">TruncateHtml is just like the vanilla truncate rails helper , TruncateHtml is just like the vanilla truncate rails
2009 Mar 02
3
Truncate function and html tags
I have a text field in the db for the body of user posts. Users submit the posts using the tinymce editor, which allows certain html tags. The posts are stored in the db with allowed html tags directly in the post, so I could have something like: <p>This post will try to eliminate the confusion regarding rails and the truncate function.</p> I am trying to display the first 300
2003 Dec 04
1
Severe pop3 incompatibility report
Hello, According to our experiences, most recent dovecot incompatible with eudora pop3 client - eudora (5.1, 6), pop3, 'leave on server' enabled: the clients receive the full inbox *every time* they check the inbox on the server. [Users using other MUAs experienced the same once, at switching from uw-pop3d/imapd to dovecot.] That is absolutely devastating, especially for home users
2004 Jan 06
3
SSL and STARTTLS
I wanted to enable SSL on some alternate ports so that a limited number of people could try SSL access. But doing so enabled STARTTLS in IMAP, so that all IMAP users got surprised (at least those whose clients attempted to use it automatically). e.g.: # IP or host address where to listen in for SSL connections. Defaults # to above non-SSL equilevants if not specified. imaps_listen =
2004 Jan 13
3
dovecot and evolution
hi, in evo when I open my mailbox INBOX is in the middle of my foder list. it seems evo sort folders alphanumericaly and eg Drafts is before INBOX. is there any way to put the inbox as the first folder? it very annoying:-( ps. anyway what is the status of the new indexing code and the thread view bug? thanks. -- Levente "Si vis pacem para bellum!"
2005 Jan 05
1
imap client library.
Dear Dovecot developers, I have several question about imap client: - Is there any difference if we want to create imap client that connect to Imap server with user mail format Mailbox or Maildir? Dovecot support both of them, are we need to create different imap client to support both of them? - Does anyone have imap client library other than UW's c-client? thanks for your
2003 Nov 25
1
mbox format
I wish to know some implementation details about mbox. When you you mbox format in IMAP, are you doing to keep the same message UID across IMAP session if you know that any other program can modify the mailbox as it wants, for example, two messages can be exchanged. In this case, will the UID kept the same ? If they keep their UID, how do you identify the messages ? Thanks, -- DINH V.
2013 Jun 29
2
how to remove nokogiri warning message
hi I always get this message today WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.0 I googled by all solution is for mac, I am use linux(openSUSE 12.3) any one can help? thanks in advance -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop
2013 Jun 14
1
Setting up a rails app in a relative path (using Apache and Passenger)
Hi, This seems like it should be a common problem, but I haven''t been able to google for the right terms, evidently... I''m trying to set up my rails app, not to the base domain name, but to a relative path. That is, the server already hosts an app at the domain, and I want to add a rails app. So, mydomain.com already exists and is a PHP app. I want mydomain.com/railsto point
2013 Jun 25
2
How to save xml values to mysql database
Hi All, I have a xml and I have to save those values into my mysql database using ruby1.87. How can I do it. Kindly guide me how can I get values and save them. Thanks in advance Cheers, Kp -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send
2013 Jun 13
4
Rails 3 application capable of generating an offline version of itself for download as zip archive
I''m kinda newbie in RoR yet and I''m having a hard time trying to figure out how should I implement this. I''m writing an application to store and display information about insects and their distribution. Currently I have almost all functionality implemented, except for a **very** important one: The application must be capable of "crawling" itself and generate a
2013 Jun 02
16
Ruby 2.0 is running, but Rails 4 doesn't see it.
What am I doing wrong?? ****@ubuntu:~/ruby/things_i_bought$ rake db:migrate Rails 4 prefers to run on Ruby 2.0. You''re running ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] Please upgrade to Ruby 1.9.3 or newer to continue. ****@ubuntu:~/ruby/things_i_bought$ ruby -v ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux] ****@ubuntu:~/ruby/things_i_bought$ rvm
2013 Jun 28
2
Hash_Tag Client side Validation
Hi anybody help me to find suitable validation way for Hash_Tag, My need is user should only type hash_tag like below format. a) #sports b) #sports,#news Please Help Me, Regards, Manoj. -- 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 unsubscribe from this group and stop receiving
2013 Jun 27
2
[HELP] RoR Fedena App Installation: Rake Gem
I''m really a newbie with RoR. But I need to deploy this app as soon as possible. RoR App: Fedena RoR Ver: 1.8.7 When I type any rake commands I always encounter this problem: rake aborted! uninitialized constant ActiveSupport::Dependencies::Mutex Locally, I did find the solution for this problem by downgrading my Rake Gem version from 0.9.2 to 0.8.7.. The problem is installing it on
2013 Jun 18
1
Getting rspec error: Net::SMTPServerBusy: Relay access denied
I''m trying to test registration emails (sent with devise), and I keep getting the error: Net::SMTPServerBusy: 454 4.7.1 <model_spec-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org>: Relay access denied I''m running Rails 3.2.11 with Capybara, and I have (temporarily) chopped my spec_helper.rb and test.rb files down to the bare minimum, still getting the error above.
2013 Jun 09
2
Minitest mock or stub methods
Hi I''m building a small library to use in my Rails app which interacts with a 3rd party API. It fetches artists and tracks. So I have: lib/my_lib.rb lib/my_lib/artist.rb lib/my_lib/track.rb To get an artist I do artist = MyLib::Artist.find("Oasis") Which returns an instance of Artist if it finds (via 3rd party API) it or nil otherwise. Then I can call artist.tracks which
2013 Jun 18
2
`require': cannot load such file -- nokogiri (LoadError) in rubyXL
Hi All Getting the below error when running the source code My requirement is : I want read / write the excel sheet ( both xls / xlsx ) from Ruby , if you have any other solution also share with me .. *Source Code :* * * * bash-3.2$ cat rubyXL.rb require ''rubyXL'' workbook = RubyXL::Parser.parse("test.xlsx") workbook = RubyXL::Workbook.new sheet_Name =
2007 Mar 29
1
improving on: truncate(..) + rendered text ?
Hello all, In a summary page I need to show the 1st 100 chars of textilized messages. Problem: truncate(..) would often cut in the middle of html tags => random result. My first idea was to "repair" the broken text with Hpricot (as I use it elsewhere in the project), but it''s not perfect: <h1>abcd</h would give <h1>abcd</h</h1> (I also use
2010 Jul 09
2
String truncate
one string named as: mytest.txt how can I remove the .txt and return the mytest only. i tried split substr, and grep didn't work it out, Thanks so lot -- View this message in context: http://r.789695.n4.nabble.com/String-truncate-tp2284045p2284045.html Sent from the R help mailing list archive at Nabble.com.