Displaying 20 results from an estimated 200 matches similar to: "How can my boss take rails seriously with bugs like this?"
2006 Jul 05
1
time.next_week bug?
i ran into an error today when dealing with the method next_week and
daylight savings time...
>> Time.local( 2006,10,23 ).next_week
=> Tue Oct 24 00:00:00 EDT 2006
Any one know if this is a know issue or should a ticket be created for this
issue?
thanks for the help
mark
--
Mark Van Holstyn
mvette13@gmail.com
http://lotswholetime.com
-------------- next part --------------
An HTML
2006 Apr 25
1
Array of dates/times from time.now till nextweek
Hi,
I would like to make @dates in my controller.
I tried the following:
startdate = Time.now
enddate = startdate.next_week
for enddate > startdate
@dates << startdate
startdate = startdate.tomorrow
end
But I get an errormessage when I check the syntax:
"warning: useless use of a variable in void context"
Anyone?
Thanks!
Steven.
--
Posted via
2006 Mar 01
3
Convert Date to Time
Hi,
How do i convert a Date to a Time??
I have a date returned from sql and i need to be able to use handy
functions like next_week or beggining of week.
Any help appreciated
Thanks,
Chris
--
Posted via http://www.ruby-forum.com/.
2009 Feb 27
2
Modify beginning_of_week?
Hello everyone!
Is it possible to modify this function: beginning_of_week?
What I want is something like this :
beginning_of_week(0) returns Sunday
beginning_of_week(1) returns Monday
Thank you!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Aug 07
3
repeat_every doesn''t tie in with first_run...
Ezra,
Sorry for inundating the list. In using the autostart, repeat_every,
and first_run, I noticed a behaviour I didn''t expect.
I would like the job to run starting at 2am, and then every 24 hours.
So I set first_run to Time.now.beginning_of_day + 2.hours, and
repeat_every to 24.hours.
The problem is if backgroundrb starts up at 6am (due to a code change
or server bump), then the
2006 May 07
3
Webrick not showing sql queries any more?
Hi all,
I updated rails to 1.1.2, and somehow, when I run script/server on a new
rails project, I don''t see the sql queries in the console any more... It
was very useful to see them live...
Does any one have any idea why?
Thank you very much!
Nauhaie
--
Posted via http://www.ruby-forum.com/.
2006 Apr 30
7
Rich text aera?
Hi all,
I am trying to add an article editing interface to my future webstore,
and I am wondering what to use for text formatting.
I would like to avoid using HTML, and calibre-bbcode just won''t work
(see my last post).
Is there some kind of library for live text formatting right in the
browser? I would just need bold, italics, size and ul lists... Do you
know of a good solution?
2007 Mar 13
6
Easy Date question - newb
All I want to do is find the objects that were created today under the
''created_on'' column. I''ve tried many ways, here is one example using
the chronic gem.
@products = Product.find_all_by_created_on(Chronic.parse(''today''))
I must be missing something right in front of me .... Thanks for any
help.
2006 Jul 16
6
Apache2.2 + Mongrel: what do you think about these perfs?
Hi all,
I''ve been spending quite a lot of time trying to install a decent RoR
server on my dedicated server (Ubuntu 6.06 LTS), and now, everything
works.
However, the performances are not really what I had expected... I would
like to know what you think about it.
Here is my config: 2GHz VIA proc, 1Gb RAM, SATA-II HD.
I have apt-got ruby 1.8.4, mysql5 and installed rails 1.1.4 by
2006 Aug 03
12
More than one has_many :through association between the same 2 models
I wonder if you can have more than one has_many :through association between
2 models.
For example...
I have a model Teacher and a model Class
Now, 1 Teacher works in many Classes, right?. So I need a join model like
class Work < ActiveRecord::Base
belongs_to :teacher
belongs_to :class
end
But I also would like to know if a teacher CAN teach a class before I
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
2006 Apr 22
3
freeze_gems not freezing all gems?
Hi,
I am currently experimenting on rake freeze_gems and there is something
I do not understand.
When I freeze_gems my app, it puts Rails in the /vendor/ directory,
which works. But what about all other gems I have installed (for example
Unicode, sqlite support, mysql support and so on)?
The aim of freezing is to be independant of the versions of the ISP, but
it seems that the server still
2006 Mar 18
1
Date formatting and adding question
Hey all,
I''m working on a site for a client that has a scedule im trying to
display that pulls the next events for the upcoming Sunday from a MySQL
table....The table stores the event date as mm/dd/yyyy. I''ve tried to
think of everyway possible to get this thing to change after every
sunday to show the next sunday''s events, but I end up doing it
manually...
Is it
2006 Aug 17
2
How to trigger an action from script/console
Hi,
I have build a conversion script from an old database to a new one
(which is designed to work with ROR), and every action converts one
table and takes over 5 minutes... When I trigger the actions from my
browser, I finally end up with a "Failed to start properly"...
So, simple question: How can I do this from the console, that is to say,
trigger one of my controller''s
2007 Sep 06
2
HABTM Loops
So, I have a "schedules" table and a "hours" table, joined by a
"hours_schedules" table. Think of the hours table as a category for
when people will schedule themselves to work, which happens in weekly
increments. At any given hour, there will be X number of people
working. I need to represent each worker with an asterisk symbol in
the weekly view. For example,
2006 Apr 29
3
Post to a remote page
Hi all,
I am sorry if this question has already been replied here, but I did not
manage to find an answer.
I am looking for a way to post data to a remote web page. I don''t want
to use hidden fields and a submit button, I would just like some ruby
code that would post parametres to a web page and store the web page
that the remote server sends back.
I am not sure that I have been
2010 Oct 13
10
Rails 2.3.8 - What happens to a datetime field between a form being submitted and the controller receiving the params
I currently have a model that simply contains one datetime field:
class CreateElectricityReadings < ActiveRecord::Migration
def self.up
create_table :clocks do |t|
t.datetime :time_keeper
t.timestamps
end
end
def self.down
drop_table :clocks
end
end
If I enter the date string "13/10/2010" into this field its showing up
in the controller as
2006 Sep 13
4
Mini_Magick Problem
I can''t for the life of me figure this out. Been banging my head on
this since the weekend, and can''t see what I''m doing wrong.
This code works:
image.resize("640x480")
image.write(path)
I run this and I get the resized file just fine.
This doesnt work at all:
width = 200
height = 100
dimensions = "#{width}x#{height}"
2009 Jul 23
11
Problem with named_scope
Here are my scopes:
default_scope :order => ''posted_on DESC'', :conditions => { :status =>
''visible'' }
named_scope :positive, :conditions => { :rating => ''positive'', :status
=> ''visible'' }
named_scope :neutral, :conditions => { :rating => ''neutral'', :status
=>
2009 Jun 07
17
ActiveRecord Classes
I''m having a little trouble with understanding how to work out the
schematic for some of my classes using ActiveRecord when a file is in my
lib directory:
Brief example:
Here''s the outline of the files in use:
....app
........controllers
............application_controller.rb
............rushing_offenses_controller.rb
........models
............rushing_offense.rb
....lib