Displaying 20 results from an estimated 100000 matches similar to: "How to find Date and Time difference in controller?"
2007 Dec 27
1
Do any one have success stories using ExtJS with rails
Do any one have success stories using ExtJS with rails?
Its open to discuss about Ext-Js plugin''s features, success stories and
drawbacks..
Cheers,
Ratnavel
--
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 post to this
2007 Dec 06
8
Default value for country_select
Using Country_select how to have default valur set to United States.
I have a select drop down in my Ui to display the Country names.
But i need United tates to be selected as default value.
I use country_select to populate the country names.
This is how i use <%= f.country_select :country, :selected=>''United
States'' %>
i also tried
<%= f.country_select :country,
2007 Apr 23
3
How to change Date format
Hi all,
I am using InstantRails with MySQL-Front. Date is stored in format
yyyy-mm-dd
in database. I want to retrieve and show date in dd-mm-yyyy in my
view.rhtml.
How can I change it to dd-mm-yyyy form.
Please help me out.
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2008 Apr 15
1
How to call a java applet in rails application?
HI,
I have a applet file named "Scanner.class" which will scan and upload
image to the web server from Scanners.
I have couple of doubts in accessing that applet file.
1. How to call this applet from rhtml file, and where should i place
this file.
2. I also use some external jar files which i imported in my applet
file, where should i place these jars?
Thanks,
Ratnavel
--
Posted
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
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
2008 Jul 22
1
Rails and Giropay Integration help needed?
Hi,
I have a requirement to integrate paypal, google checkout, giropay to
my application for payment processing. Am done with Paypal and google
code.
I need help in integrating giropay since my cliet is from Germany..
Gimmi some fair suggestion in integration.
Thanks in advance,
Ratnavel
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
2007 Dec 07
2
Pagination using will_paginate
Hi,
I use will_paginate plugin to paginate the records in my view file..
I implement the same in 2 of my modules..
Its working fine in one module where i perform only the basic CRUD
operation.
In the other module i do have search option. This plugin behaves
different for that method..
Normally if one click the page number links the request will be posted
back to the same action or method
2008 Jan 07
0
Is Ext js compatible with Rauils 2.0.2?
Hi,
I was using Rails 1.8.6 till last week..
Now i updated my system dev environment to Rails 2.0.2, From then those
Ext js modules are not working..
Can some one help me out..
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 Mar 05
0
TWAIN and rails applications
Is TWAIN compatible with Rails application?
Do anyone has success stories with this..
Thanks,
Ratnavel.
--
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 post to this group, send email to
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>
2007 Sep 19
3
link_to method of different controller
I want to link to a method of a different controller. I thought I new
how to do this but the code that I have is not working:
<%= link_to ''Welcome Page'', { :action => ''index'', :controller =>
''music_controller'' } %>
Any ideas, thanks
~S
--
Posted via http://www.ruby-forum.com/.
2008 Aug 30
4
acts_as_commentable: find Post by date of comment
Hello,
I am using acts_as_commentable (related to Post) and I would like to
know how to get the list the posts ordered by date of comment (i.e.
post with recent comment first).
in addition if a post has no comment, i would it to be inserted based
on its creation date.
Thanks for your help
Nicolas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
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 Dec 21
1
changing active record to use date or datetime instead of time
Hello,
I need to use Date or DateTime for a column instead of Time because I
have need to include dates older than 1970. I am using SQL Server for
a backend. I have been experimenting with changing the column type in
SQL Server, but active record always seems to Time regardless of what
the column type is.
Is there something I need to declare in my model?
I can''t seem to get active
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?
2007 Aug 12
4
Date and Time validator, updater
Can someone point me to a date/time validator or updater.
I have an event start datetime and an event end datetime. I want
to validate that the end datetime is after the start datetime.
Figure there is some code or library out there already, if you
know one, please forward it.
Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2009 Jan 17
0
Created_at date/time if off by UTC-5 hours ?
Hello -
My model has created_at and updated_at which get set automatically, as
expected, but the time is 5 hours off. For example, if I create a new
record at 7:15:25 AM the created_at time shows 12:15:25.
I suspect this has to do with my time zone (Eastern Time, United
States). But if I do a Time.now, it shows the correct time.
Does the Timestamp class use a different zone than the Time
2008 Oct 15
0
Combine date and time in mysql
I have a date from a calendar_date_select and a time from a time_select.
They go to a date field and a time field in mysql. How do I combine time
and date on both sides to make a comparison in a find?
I think this is on the right path, right?
DATE_ADD(start_date, INTERVAL start_time HOUR_SECOND)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You