Displaying 20 results from an estimated 20 matches for "steelski".
Did you mean:
steelskies
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username
and password, my setup is firstname, lastname, password.
I seemed to be gramatically challenged and not sure how to set up the
parameter list. Can anyone offer up a suggestion.
The book shows the method starting like:
if request.post?
user = User.find(:first, :conditions => [''username = ?'' ,
2007 Feb 06
2
Login systems : stubbing accounts and AR association proxies
My Rails site has a fair amount of login and ''ownership'' logic. For
instance, we have a number of clients (companies), each of which has
several accounts. A client owns a number of different types of
resources, and shouldn''t see any other clients'' resources, so, for
example, our ScenesController contains a lot of references to
2011 Dec 08
5
Master repeatedly killing workers due to timeouts
Hi,
We''re using unicorn as a Rails server on Solaris, and it''s been
running great for several months. We''ve recently been having a few
problems and I''m at a loss what might cause it. A number of times in
the past few days, our unicorn slaves keep timing out & the master
keeps restarting them. unicorn.log looks something like :
E,
2006 Aug 16
1
Stale object errors
I''m running into a couple of stale object problems with methods that
at first glance appear fairly atomic - eg Message.update(params[:id],
{:body => params[:value]})
Of course, Rails has to instantiate the object & validate it before
it updates the database, so it''s not actually atomic, hence the
occasional staleobject error.
So I''ve been wondering about
2006 Sep 28
1
upload_progress and DRb.start_service crashes
Whenever I tried to start mongrel_rails with the upload progress
script, it would die with the following error:
/usr/local/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'': getaddrinfo:
No address associated with nodename (SocketError)
from /usr/local/lib/ruby/1.8/drb/drb.rb:837:in
`open_server_inaddr_any''
from /usr/local/lib/ruby/1.8/drb/drb.rb:860:in
2006 Jul 27
4
How To Test For W3C compliance locally and possibly to include it in to Continuous integraition process
Hi Everyone,
As many of you out there I''m "protected" by the firewall which prevents
me from checking my code for W3C compliance, I am able to check the
production
code but i would like to test my code before it goes to production.
So if anyone was able to have that check done locally, possibly
including some sort of tests in to the integration process, I would
truly
2007 Feb 07
1
Repeatedly dying with "failed to find slave socket"
I''m struggling to keep backgroundrb v2 running for more than 24
hours. It appears to be running fine for a while, then tries to fire
off a worker (exactly the same worker it''s been running for the past
few hours), and it suddenly dies. I haven''t found any pattern for the
cause of this.
In backgroundrb_server.log, the final entry is this :
20070206-10:41:45
2006 Dec 20
6
Mongrel 1.0 RC1 Full Win32 Build
Hello Minions!
It''s *finally* here. Mongrel 1.0 RC1 for everyone to test, even the win32 folks. I managed to get everything to build on windows, including fastthread, and even cleaned up the "releases source":http://mongrel.rubyforge.org/releases/ so that it should install cleaner. Win32 will have to try and report problems, as it seems rubygems is real finicky on win32.
2006 Jul 20
5
Why don''t I get 404s?
When I go to a missing page in my rails app, I get the 500.html page,
and this in my log output:
no route found to match "/asdasd" with {:method=>:get}
./script/../config/../vendor/rails/actionpack/lib/action_controller/
routing.rb:1057:in `recognize_path''
./script/../config/../vendor/rails/actionpack/lib/action_controller/
routing.rb:1047:in `recognize''
2006 Jul 04
0
Best way of storing and recalling data for display?
I want to store a number of snippets of html representing messages,
and display them in response to user events.
I''m currently storing them in a javascript array at page-load time,
then display individual snippets using Element.update(). The
message array can get extra messages added to it following an ajax
call. The set up looks something like this:
<script
2006 Jul 19
0
Clearing dependent collections
I have a user model that owns messages :
class User < ActiveRecord::Base
has_many :messages , :dependent => :nullify
end
I''m using nullify so that when the user is deleted, the messages
continue to exist - they''re just marked as being ownerless.
However, calling user.messages.clear actually deletes all his
messages, which I was a little surprised at. I would
2006 Jun 27
2
Avoiding race conditions
I want to be able to display a number of messages, and guarantee that
they''re only displayed once. Something like this :
def get_new_messages
@messages = Message.find(:all, :limit => 5, :conditions => ''new = 1'')
@messages.each do |msg|
msg.new = 0
msg.save
end
end
However, there''s a race condition in the above code if two users try
to access
2006 May 24
0
POST op parameters are coming in as StringIOs
I''m receiving a multipart post request from another server. The
request parameters are being received as StringIOs, rather than plain
strings. For instance :
Processing MessagesController#receive (for 83.166.68.31 at 2006-05-24
10:36:53) [POST]
Session ID: eedafb24033be0714f8133f02810083f
Parameters: {"message"=>#<StringIO:0xb7503358>,
2006 Aug 03
1
Why doesn''t redirect_to handle rjs?
Is there a good reason why redirect_to doesn''t check responds_to, so
it can handle redirects in rjs calls? I''ve done something like this
in my app controller, seems to work ok...
alias_method :redirect_to_orig, :redirect_to;
def redirect_to(options = {}, *parameters_for_method_reference)
respond_to do |accepts|
accepts.html do
redirect_to_orig
2006 Aug 07
2
Getting an array of ids from form checkboxes?
Is it possible to set up a list of checkboxes so that the form
parameters are given in an array (eg {"delete_list" => [3,6,7]}) ?
At the moment I''m using
<%= check_box_tag "delete_list[#{post.id}]" %>
...which gives parameters looking like {"delete_list" => {"3" => "1",
"6" => "1",
2006 Aug 12
2
Mongrel 0.3.13.4 headers seem a bit broken...
I''m running a Rails (r4720) app on OS X 10.4.6. Mongrel 0.3.13.3
works perfectly for me. Mongrel 0.3.13.4, not so much.
Redirects don''t work, for one thing. This rails code :
redirect_to :action => ''login''
correctly redirects me on 0.3.13.3. Here''s the header I get back :
HTTP/1.1 302 Moved Temporarily
Content-Length: 93
Connection: close
2006 Jul 07
3
Mongrel & irbrc
Why does mongrel_rails insist on loading ~/.irbrc with each request?
a) I''m curious why it loads it at all (I assume there''s no way of
getting an inline breakpointer??)
b) Why re-load it? It causes problems with any constants that are
used in .irbrc... (alternatively, how do I avoid re-assigning to a
constant?)
Jon
-------------- next part --------------
A non-text
2006 Jul 10
3
Receiving mail - "No such file to load -- pathname"
I''m using postfix in OS X to receive mail and forward it to my rails
app. When it tries to feed the email into rails, it fails with the
following error:
"/Users/jon/Developer/OneMod/script/runner ''MailMan.receive
(STDIN.read)''".
Command output: /Users/jon/Developer/OneMod/script/../config/
boot.rb:7:in `require'': No such file to load --
2006 Jul 21
3
Re-formatting email line breaks
I''m trying to re-flow email messages, removing the line breaks that
get added by mail programs so that the lines don''t exceed 72 characters.
Mail.app and Thunderbird seem to insert a space character before each
added line break.
Outlook replaces new lines in the email with double \n''s, then uses
single \n''s for the ''soft'' line breaks.
2006 Aug 10
4
Speeding up ActiveRecord creation?
My completely empty model (no validation callbacks etc etc) takes an
average of 0.05 seconds to create, at least according to
Benchmark.realtime{200.times{Message.create(:from =>
"me@here.com", :message_type => ''email'',
:subject => "hello", :body => "goodbye", :sent_at => Time.now)}}/200
That''s a little slower than