Displaying 3 results from an estimated 3 matches for "thomasmallen".
2010 Apr 21
4
Accessing the router from a helper
I find manually accessing the router to be quite ugly below. Is there
a more direct way to access it?
module ApplicationHelper
def menu_item text, url = nil
routes = ActionController::Routing::Routes
url = if url
if url.is_a? String
url
else
routes.generate url
end
else
routes.generate :controller
2010 Apr 19
0
Gem::FilePermissionError on "rails:freeze:gems" task
My understanding is that the "rails:freeze:gems" task copies the Rails
source into the application''s vendor directory. Which is why I find
the following error surprising and confusing, because the task should
not involve writing to system files or directories:
% rake rails:freeze:gems
(in /Users/tallen/apps/pnc)
Freezing to the gems for Rails 2.3.5
rm -rf vendor/rails
mkdir -p
2010 Apr 28
1
ActiveResource does not detect errors for my very simple model
The documentation says to return a code 422 with a packet in the
following format:
<errors type="array"><error>First cannot be empty</error></errors>
So that is what I am doing. But my model will not raise an exception
on a create call that returns such a response, and a record created
that way returns true for its valid? call.
I simply do:
>>