similar to: distance_of_time_in_words_to_now

Displaying 20 results from an estimated 100 matches similar to: "distance_of_time_in_words_to_now"

2010 Sep 07
2
Help on formatting some HAML
I wondered if anyone could help me with turning the following in ERB into HAML. I''m VERY new with HAML: ---- <div class="block-element span-7 colborder"> <span class="rightside blue-hue no_decor"><%= link_to "New Order", new_order_path, :remote => true %></span> <h3>Today''s Activity</h3> <hr>
2006 Jan 27
2
distance_of_time_in_words_to_now
any idea how to use distance_of_time_in_words_to_now? -- Posted via http://www.ruby-forum.com/.
2006 Feb 01
1
distance_of_time_in_words_to_now with "ago" suffix
I wanted the distance_of_time_in_words_to_now method to have '' ago'' suffixed to it when the date is in the past, I assumed this would be the default behaviour but apparently not. I know of a REALLY messy way that i could solve this with, but it''s so ugly I can''t be bothered Does anybody have an easy, elegant solution?
2008 May 20
2
DateHelpers .. don' display.. ?
HI I don''t understand what happen .. if I use the script/console : >> include ActionView::Helpers::DateHelper => Object >> include GLoc => Object >> time_ago_in_words(Time.now, include_seconds = false) => "moins d''une minute" I get the correct answer.. but I I write in my view <%= time_ago_in_words(Time.now, include_seconds = false)
2009 Sep 09
0
distance_of_time_in_words_to_now and i18n
Hello, Im using this method and sometimes getting errors like this: I18n::InvalidPluralizationData in Forums#show Showing app/views/forums/show.html.erb where line #13 raised: translation data {:one=>"1 minuto", :many=>"{{count}} minutos"} can not be used with :count => 2 It only happens when using localization (I have the file, pt-br.yml and its ok, I checked it
2006 May 24
0
distance_of_time_in_german_words
Hiall, This could be useful for those of you producing websites in the german language. Basically I copied the definition of the rails builtin distance_of_time_in_words and extracted another method german_words_for_distance_in_seconds. Just put these e.g. into module ApplicationHelper and you can use it in all views. def distance_of_time_in_german_words(from_time, to_time = 0, include_seconds
2006 Apr 22
1
Newbie question about using helpers in controllers
I''m trying to display a list of pages in xml. I want to change page.update_at to distance_of_time_in_words_to_now. However whenever I run it I get an error saying: undefined method `distance_of_time_in_words_to_now'' I know I can just go the rails api and copy the source, but there must be another way. def list @page = Page.find(:all, :order => "updated_at desc")
2005 Dec 27
3
created_on & updated_on - helper to display date only
All, My initial list is rather busy. I would like to shorten the created_on and updated_on fields to just display the date, not the time. Best wold be a simple 12/28/05 type of presentation. I''ve found the format helpers in rdoc. (ie. distance_of_time_in_words_to_now ), but none seem to be what I''m looking for. How do I control the date format of a timestamp field? Thanks
2007 Oct 14
1
Fw: How to make "Add permission" for folder in system with ntacl support?
Is it too simple and therefore noone will answer? :) Or it is not possible with Samba on Linux? Thanks, G. ----- Original Message ----- From: "Georgy Goshin" <gosha@inbox.ee> To: <samba@lists.samba.org> Sent: Thursday, October 11, 2007 6:34 PM Subject: [Samba] How to make "Add permission" for folder in system with ntacl support? > Hi, > > On
2006 May 10
3
formatted date down-counter - help!
I''d like to have a count down to a certain date, but display it in words, such as "123 days away" or something. I''m aware of the function "distance_of_time_in_words_to_now()", which will display "about 6 hours" or "12 days" or something like that, but how can I get it to reverse? Pass it a date for future reference, then it will error
2006 Jun 18
2
convert timespan to verbose description
Hi, I always see RoR pages showing the elapsed time like that ''Published 3 days, 23 hour and 5 minutes ago'' ''Published less than 3 minutes ago'' I guess this conversion can be done using a Rails function, however I can''t find it. Does somebody know its name?? Thanks a lot Peter
2008 May 05
2
Add permission? (was How to create a write-only share?)
Need your help! I'm very confised and tired, tried a lot of variants but still at the start, even lost all understanding how the permissions and masks works. Please write me a config for the following case: There is a directory: '/home/shared/door', owned by 'michael:office' shared via samba as '[door]' How can I configure the FS and samba to let 'michael'
2007 Oct 31
3
How to make "Add permission" for folder in system withntacl support?
Hi! Let's go back to this topic please! I have to replace the Windows NT 4.0 server with Samba but I still don't know how to do this. I need to allow to someone (some user group) the right to add files into the folder. They use this "feature" on current NT server ver often and to this in the following ways: 1. Rightclick on file you want to add, Copy, then go to server, for
2006 Mar 30
4
Simple Ruby/Rails question, doing posted hours ago
I am not the Ruby aficionado yet, if I have created_on ...timestamp. What is a ruby way of getting the hours/minutes/seconds ago. is there some class that has this implemented. For example: Posted on 3/28/2006 Show a time with: posted: 1 day ago ... something along those lines. -- Berlin Brown (ramaza3 on freenode) http://www.newspiritcompany.com also checkout alpha version of botverse:
2008 Feb 03
4
Testing helper/view methods from script/console
Hi, Is it possible to test helper/view methods from script/console. I want to test the output of methods like distance_of_time_in_words. But it won''t let me from the console. What am I missing? TIA Luke -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on
2011 Nov 02
4
undefined method `updated_at' for #<Classified:0x686c5e4>
HEllo, I have the following problem with rails, I am new in this...is there anyone who explain to me what´s happens? Thanks See below: NoMethodError in Classified#show Showing app/views/classified/show.rhtml where line #17 raised: undefined method `updated_at'' for #<Classified:0x686c5e4> Extracted source (around line #17): 14: 15: <strong>Date Posted:</strong>
2008 Apr 04
5
How to create a write-only share?
Hi! I need to create a share that will be readoble by root only (by owner) and writeable for all. We replacing a dead Windows NT 4.0 server and there was a permission type called "Add" and our users uses this type of permission often. They creates a shares where other users can add files but can not read or even list it. I saw a thread here called "How to make "Add
2008 May 27
0
How to find Date and Time difference in controller?
Hi, I need a method similar to "distance_of_time_in_words_to_now" to be used in the controller. "distance_of_time_in_words_to_now" methods work only in view. Thanks, Ratnavel. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Apr 09
1
chi-square test
Hi R-users, I would like to find the goodness of fit using Chi-suare test for my data below: xobs=observed data, xtwe=predicted data using tweedie, xgam=predicted data using gamma > xobs <- c(223,46,12,5,7,17) > xtwe <- c(217.33,39,14,18.33,6.67,14.67) > xgam <- c(224.67,37.33,12.33,15.33,5.33,15) > chisq.test(xobs, xtwe = xtwe, rescale.p = TRUE) Error in chisq.test(xobs,
2012 Jul 19
0
New Gem: validation_hints
Hi, I hope this is the correct way to announce a new gem: validation_hints https://github.com/acesuares/validation_hints https://rubygems.org/gems/validation_hints It''s purpose is to get a list of ''hints'' derived from validation on a model or attribute. These hints then could be used in the user interface, for instance for displaying a tooltip or other