Forum: Ruby on Rails Ruby on Rails Dates

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C00218c047a27287fd91a3251976c425?d=identicon&s=25 Rob P. (robmfc)
on 2009-01-14 13:34
Hi,

I am using a MySQL database and have a row callsed date in my fixtures
table. I am wanting to display fixtures coming up, i.e. ahead of todays
date.

In  my controller I am thinking of doing;
@fixtures = Fixtures.find(:all, :conditions => "date > #{Date.today} ",
:order => "id DESC")

Do dates work this way, is this the correct way to go about it?

Also, are there any forum systems built with Ruby on Rails that I can
download for use on my site?

Thanks in advance, Rob
80e4cb97cae5c8d745f72337d93fd8f2?d=identicon&s=25 MaD (Guest)
on 2009-01-14 13:43
(Received via mailing list)
as for forum software:
http://rforum.andreas-s.net/

your idea with dates should work, too.
Ef3aa7f7e577ea8cd620462724ddf73b?d=identicon&s=25 Rob Biedenharn (Guest)
on 2009-01-14 13:59
(Received via mailing list)
On Jan 14, 2009, at 7:34 AM, Rob Pa wrote:
> :order => "id DESC")
>
> Do dates work this way, is this the correct way to go about it?

At least, I'd change this to:

   @fixtures = Fixture.find(:all, :conditions => ['data > ?',
Date.today],
                            :order => 'id DESC')

But it would be better to put this into a named scope:

   class Fixture
     named_scope :future, lambda { {:conditions => ['data > ?',
Date.today]} }
   end
then, in your controller
   @fixtures = Fixture.future

> Also, are there any forum systems built with Ruby on Rails that I can
> download for use on my site?
>
> Thanks in advance, Rob
> --


I was about to give you a couple answers, but then I re-read your
question. I'm not sure about forums, but there are certainly a few
options for wikis.

  http://letmegooglethatforyou.com/?q=ruby+rails+for...

-Rob

Rob Biedenharn    http://agileconsultingllc.com
Rob@AgileConsultingLLC.com
9a2a53db8e9b4476038c94a64b32833f?d=identicon&s=25 Ryan Bigg (ryan-bigg)
on 2009-01-14 14:03
(Received via mailing list)
And http://github.com/radar/rboard - Fully supports Rails 2.2 and
internationalisation.
-----
Ryan Bigg
Freelancer
http://frozenplague.net
E8d97590e9c83b09f52984d89d66801e?d=identicon&s=25 Michael Michael (rubyfinder)
on 2009-01-14 17:13
I don't mean to be too intrusive as I am a dreadful IT Recruiter that
you probably all despise. I am working on filling a number of RoR
Developer positions for an exciting young company in NYC. If you are
interested in learning more about the position please e-mail me,
mmartino@apexsystemsinc.com or call me at 212.991.1835. No one has to
know that you contacted me regarding and you can still bash me here in
the blog.

Have a great day! Thanks!



















Rob Pa wrote:
> Hi,
>
> I am using a MySQL database and have a row callsed date in my fixtures
> table. I am wanting to display fixtures coming up, i.e. ahead of todays
> date.
>
> In  my controller I am thinking of doing;
> @fixtures = Fixtures.find(:all, :conditions => "date > #{Date.today} ",
> :order => "id DESC")
>
> Do dates work this way, is this the correct way to go about it?
>
> Also, are there any forum systems built with Ruby on Rails that I can
> download for use on my site?
>
> Thanks in advance, Rob
53be54e5db4dc58e4980db5a8255621b?d=identicon&s=25 Harold (Guest)
on 2009-01-14 20:54
(Received via mailing list)
Can't you just send out an email, with [JOBS] in the subject? I don't
think anyone would be bothered by that. Don't change a discussion
subjects just for spite. Have some class.

On Jan 14, 11:13 am, Michael Michael <rails-mailing-l...@andreas-
This topic is locked and can not be replied to.