Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-05 Thread soffolk
On June 6, 2013 at 10:54:10 AM, Tamara Temple (tamouse.li...@gmail.com) wrote: If you want to, go ahead. Put it in a module, then send :include to String with your module name. If you really did not want suggestions, why did you ask for them? If you already have an answer you are settled on,

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-05 Thread Tamara Temple
soffolk wrote: > more than that, you can use it to produce your summary and save it into > database. > > I think it's a universal function, and we need not to limit it. just expand > String If you want to, go ahead. Put it in a module, then send :include to String with your module name. If yo

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-05 Thread soffolk
more than that, you can use it to produce your summary and save it into database. I think it's a universal function, and we need not to limit it. just expand String On June 6, 2013 at 6:27:21 AM, Tamara Temple (tamouse.li...@gmail.com) wrote: soffolk wrote: > I mean the result use content_t

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-05 Thread Tamara Temple
soffolk wrote: > I mean the result use content_truncate is more meaningful for user So, this would be something you'd use in a view? If so, it should go in a helper. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from th

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-04 Thread soffolk
I mean the result use content_truncate is more meaningful for user sorry about my poor English. On June 5, 2013 at 8:14:34 AM, Tamara Temple (tamouse.li...@gmail.com) wrote: soffolk Zhu wrote: > The truncate result is pool mostly time, so i think a more meaningful is > useful I can't pars

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-04 Thread Tamara Temple
soffolk Zhu wrote: > The truncate result is pool mostly time, so i think a more meaningful is > useful I can't parse this, sorry -- 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 emai

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-03 Thread soffolk Zhu
The truncate result is pool mostly time, so i think a more meaningful is useful 在 2013年6月2日星期日UTC+8上午4时30分12秒,tamouse写道: > > soffolk Zhu > wrote: > > sometimes we need to truncate a long text more smart. > > > > The Model layer represents your domain model (such as Account, > Product, Per

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-01 Thread Tamara Temple
soffolk Zhu wrote: > sometimes we need to truncate a long text more smart. > > The Model layer represents your domain model (such as Account, Product, > Person, Post, etc.) and encapsulates > the business logic that is specific to your application. In Rails, > database-backed model cla

[Rails] How about add a method to truncate a long text more smart?

2013-06-01 Thread soffolk Zhu
sometimes we need to truncate a long text more smart. eg: The Model layer represents your domain model (such as Account, Product, Person, Post, etc.) and encapsulates the business logic that is specific to your application. In Rails, database-backed model classes are derived from ActiveRecor