On Jan 8, 6:52 pm, Dan Smith wrote:
> Can anyone suggest anything to try?
Does your host give you shell access? If so, cd to your project
directory and run
script/console
and
RAILS_ENV=production script/console
and see if you get any error message back in either case. If it's
successful,
I'd like to ask if people have thoughts on clean ways of making
behaviour in the model depend on attributes of the request.
Things I'm thinking of:
* per-user Time.zone (currently handled by setting a thread-local
variable in the controller)
* created_by and updated_by fields. Googling around, t
To find what the machine thinks its own name is (which may or may not
be related to the hostname you want in a callback url), try:
Socket.gethostname
As has been pointed out, the callback url also needs things like the
port. If you are generating this within a controller action, you could
of co
> If you do want those semantics (perhaps because you're inside one or
> more helper methods where it's not so convenient to just render and
> return) then it should be easy enough to recreate them with an around
> filter.
An around_filter with catch and yield would do the job. I hadn't
thought of
> Why do you need to terminate a request early? Is this an HTTP request?
By "request" I meant "controller action".
Within a method called by the controller action, I want to render
something and then prevent the controller action from continuing any
further (otherwise I'd get a double-render err
Is there a standard way in Rails of terminating a request early with
throw or raise?
I am thinking of when a controller invokes a private method and inside
that method I wish to render a result and then finish. For example:
def my_action
...
authorize_something
...
end
private
> An alternative approach would be to start separate processes for
> 'test' and 'development' environments, so they can both run the
> initializer to completion. This would give the maximum speedup, and as
> long as you set config.cache_classes = false in the test environment,
I decided to go wit
://github.com/candlerb/snailgun/tree/master
I can demonstrate script/runner starting in about one-quarter of the
normal time, for an empty rails app.
However the code is far from usable at the moment - in particular, I
don't know why it doesn't work properly with `rake test` where t
8 matches
Mail list logo