Displaying 9 results from an estimated 9 matches for "augustlilleaas".
2007 Jan 18
5
Session IDs and SWFUpload
Hi
I''m using SWFUpload in one of my applications, but it has one big
shortcoming: it doesn''t maintain the session. Let me explain:
The user has to login to the application, thus creating an
authenticated session (cookie _session_id client side and the
sessions table server side). However, when you use SWFUpload, the
upload script is called with a new session
2007 Jan 20
2
Conditional pluralize without the number
Hi.
Assume you have an array of person names. I want to generate results in
my view that look like this:
Abby is your friend
or
Abby, Bob, and Carol are your friends.
So I''d like to say:
<%= friends.to_sentence %>
<%= pluralize(friends.count, "is") %>
your <%= pluralize(friends.count, "friend") %>
But because pluralize puts in the
2008 Oct 14
1
To all TextMate users that wants to run tests with cmd + r in Rails 2.1 and above.
Because the require ''test_helper'' at the top of all the tests is
relative now (it used to be something like require ''../test_helper''),
you can''t just run the file with ruby anymore. And running the file
with ruby is exactly what command + r does. Which means you can''t
easily run your tests from textmate.
The solution:
2007 Jan 19
4
Problem with link tags
Hell all,
I have a layout were I add my stylesheets and javascript in the
following manner:
<%= stylesheet_link_tag "/form" %>
<%= stylesheet_link_tag "/text" %>
<%= javascript_include_tag :defaults %>
But what happens is that in the actual web page the source is the
following:
<link href="/form.css?1168168516" media="screen"
2007 Jan 19
9
werid error, please help
Hi all,
I updated to Rails 1.2.1. However, when I tried to access the URL
http://localhost:3000/
i get this Application Error
Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html
I removed the default index.html and route it to Account controller.
If you read the log below, it seems that the AccountController is
2007 May 03
0
Deploying on windows 2000 server
Posted this on the rubyonrails-deployment group (http://
groups.google.com/group/rubyonrails-deployment/browse_thread/thread/
d5ef4f3525c3c39a), but figured it couldn''t hurt posting it here too.
I''m not a windows user, and I''ve never deployed on windows. Made this
small app for a company, and they want it deployed on one of their own
servers - a windows server.
2007 Jun 12
0
Log level to debug in production?
I wanted to check how the sql queries looked like in production mode.
Launched the app in prod mode with script/server after I set
config.log_level = :debug in connfig/environments/production.rb.
For some reason, the production.log did not include any queries, just
information about the requests. Does that mean that rails magically
caches everything in my database upon initialization (right..),
2007 Oct 20
0
Proper timestamps in callbacks
Yay, another Task model:
## the model
class Task < ActiveRecord::Base
attr_accessible :lots, :of, :stuff, :but, :not, :finished_at, :and, :finished
before_save do
@before_save.call if @before_save
end
def finish
self.finished = true
@before_save = proc { self.finished_at = Time.now }
end
end
## usage
t = Task.find(some_id)
t.finish
t.save
(same code on pastie:
2008 May 08
0
Running tests with textmate
What''s up with tests doing require ''test_helper'' instead of require
File.dirname(__FILE__) + ''/../test_helper'' in edge rails, so that
running test files in textmate doesn''t work?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.