Displaying 20 results from an estimated 40000 matches similar to: "Routing Fixnum"
2005 Nov 05
3
Keeping the queries down...
I''m trying to ensure that I keep the number of queries down a bit. If I
have two model (lets call them Foo and Bar). They have a many to many
relationship. Now I want to get (and paginate) records from Bar that are
related to a certain record in Foo. For example I want all records from
Bar whose name starts with ''C'' and are related to record Foo whose name
is
2013 Oct 25
2
[PATCH] support SO_REUSEPORT on new listeners (:reuseport)
This allows users to start an independent instance of unicorn on
a the same port as a running unicorn (as long as both instances
use :reuseport).
ref: https://lwn.net/Articles/542629/
---
lib/unicorn/configurator.rb | 19 +++++++++++++++++++
lib/unicorn/socket_helper.rb | 30 ++++++++++++++++++++++--------
test/unit/test_socket_helper.rb | 8 ++++++++
3 files changed, 49 insertions(+), 8
2006 May 24
7
Using inline editor without requiring a URL
Hi,
I was wondering if anyone has implemented the inplace editor without the
need for the URL. I have tried this but run into a problem in that the
''saving...'' text in shown for ever and the label is no longer editable.
Can I also confirm that my idea of the callback function is something that
runs before the value is passed to the URL (if you were to use one). What
might be
2005 Dec 14
3
why would an int column in a join table be a String class in model?
i''ve got an issue with integer columns in the database becoming strings in
the model and I''m not sure why this is happening. perhaps someone can
explain.
given the following setup (simplified for example)
tables:
users
----------
id - int
name - varchar(60)
roles
----------
id - int
name - varchar(60)
roles_users (join table)
----------
role_id - int
user_id - int
2005 Mar 04
3
Boolean values
Hi,
I''m using SQL Server. I have a BIT field. I have a fix and a question.
This is a patch for a bug in the SQL Server adapter that causes any insert or
update to fail:
lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -239,2 +239,2 @@
- when TrueClass then (column && column.type == :boolean ?
"''t''" : "1")
2005 Dec 02
0
RE: How to test for controller
There is a reason the controller is called *controller*. The controller
should be making this type of decision.
I would do it this way:
Class FooController < ApplicationController
def bar
@side_nav = :display_admin
End
def baz
@side_nav = :hide_admin
EndEnd
In the view:
<% if @side_nav == :display_admin %>
...
<% end %>
In your application controller, you can set
2005 Dec 16
10
Associative arrays
I just started playing with rails this week and am working on porting our
existing website to rails
in our navigation we have a list that has the days of the week that link to
the articles for those days.
this seems to be working when I had it in the template it would give me the
array I was looking for so I decided to move it to the helper so that I
could use it on all my templates.
2006 Jun 12
10
Cross Broswer Fire Event
Is there a standard way of programmatically firing an event on an
element? I think this code works in IE but not FF:
myElement.fireEvent(''onclick'');
I really only care about IE and FF, but anything else is a bonus. I
didn''t see anything in prototype/scriptaculous for this, but I might
have missed it. Thanks.
Joe Athman
2006 May 19
1
RE: Re: Content Rotate, unwanted flashing on Firefox
Never mind........it looks fine for me in Windows 2000 FireFox 1.5.0.3
-Andrew Martinez
-----Original Message-----
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Martinez, Andrew
Sent: Friday, May 19, 2006 5:01 PM
To:
2006 May 18
1
RE: Rails-spinoffs Digest, Vol 12, Issue 29
Issue 1: <%= @pic %> instead of <% @pic %>
-----Original Message-----
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of
rails-spinoffs-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Sent: Wednesday, May 17, 2006 11:13 PM
To:
2008 Feb 19
0
Playing Sounds with Autotest/RSpec on Cygwin
I''ve read about integrating Growl with Autotest/RSpec to display test results.
For cygwin users - here is a snippet that will play a sound after autotest runs.
Add the code below to your ~/.autotest file.
Modify the path of the .wav file to the sounds you want to play on your system.
Cheers, Andy
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Module
2006 Feb 27
0
RE: FW: Calendar widget
Perfect, thanks Marco, great help! Now, why didn''t I think of that? Lol!
-----Original Message-----
From: Marco M. Jaeger [mailto:mail-yVS5avHIROZWk0Htik3J/w@public.gmane.org]
Sent: Monday, February 27, 2006 2:02 PM
To: ''www.dhtmlgoodies.com''
Subject: RE: FW: [Rails-spinoffs] Calendar widget
Thank you Alf - I appreciate your fast response
Marco M. Jaeger | Url:
2006 May 19
10
Content Rotate, unwanted flashing on IE.
I just wrote a stupid little JS object to rotate DOM Elements (mainly
images) using Prototype and Script.aculo.us as support. Everything seems
to work well on IE and Firefox Linux but on FireFox Windows I am getting
a slight flash prior to transition.
I was wondering if a effects guru could take a quick look and see if
anything jumps out. I can live with the flash for my current project but
2006 May 19
1
RE: Re: Content Rotate, unwanted flashing on Firefox
Not to sound super lazy, but I am at work...do you think you could put up an example/demo?
-Andrew Martinez
-----Original Message-----
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Eric Anderson
Sent: Friday, May 19, 2006 4:56 PM
To:
2006 Jun 15
10
RE: Yahoo!-like Event object emulation/abstractioninPrototype?
If that doesn''t work, then you''ve done something wrong somewhere.
''Cause it works for IE for me and everyone else.
The only advantage I see with the YUI toolkit is that it''ll defer
attaching events to elements that do not yet exist in the DOM. Big
whoop, only a sloppy programmer would try to attach an event to a
non-existant element. With Prototype, you can
2005 Sep 01
1
RE: share eclipse-templates library (was: RE: Software to codeRails)
Tobias: Thanks for the feedback. You are correct, it should be "ALL
HTML" (I originally had people adding the snippet to the HTML section
but it didn''t always work so I moved it to the JSP templates... And I
guess I forgot to edit everything in the doc.
I will definitely add your comment about the cursor location! That''s
great!
-----Original Message-----
From:
2005 Dec 14
3
Advanced routing question.
Hello All,
I''m making a quick application that tracks outgoing links to referral
sites. I need to track the user and the url they went to so the
easiest way would be to take the entire url as a parameter and log
that into the database. I was wondering if I could do something like
this with routing:
http://www.example.com/user/jump/http://www.myvendor.com/referral.php?
2009 Dec 07
1
routing requirements quick question
Hi everyone, first e-mail here :)
I have the following in my routes.rb file.
map.connect ''posts/index/:page'',
:controller => ''posts'',
:action => ''index'',
:requirements => {:page => /\d+/ },
:page => nil
end
Does :requirements => {:page => /\d+/ } mean that if the :page
2006 May 23
2
Ordinalizing a date
I''m trying to use the ordinalize() method to ordinalize a day. Here''s
how far I''ve gotten:
@reportday = Time.now.at_beginning_of_week.strftime("%d").to_i
@ordinalized_reportday = "#{@reportday}".ordinalize
I was thinking it wasn''t working because the date is being returned as a
string, however I added the .to_i and still it returns an
2006 Apr 10
1
RE: Re: Prototype Ajax - How to pass my own params toonComplete
That technique will not work for this case.
By default, the response element is passed in to the onComplete handler
as the first argument. Basically, all ''bind'' does it let you bind the
''this'' element to the function, so when you reference this.whatever in
the function, the ''this'' refers to ''this'' in the scope that the event