I referred to
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/67d59a432f1d98e3
and tried this with Rails 2.2.2, but got the same result. I am
guessing the issue I am experiencing is not version-specific.
Thomas
On Apr 28, 12:16 pm, Thomas Allen wrote:
> The documentat
The documentation says to return a code 422 with a packet in the
following format:
First cannot be empty
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
It looks like ActiveResource is what I wanted.
Thoma
Thomas Allen wrote:
> Hello,
>
> I was wondering if anybody knew of a library (acts_as_ or similar)
> that provides a simple framework for mapping ActiveRecord calls to API
> calls for model instances that are
Hello,
I was wondering if anybody knew of a library (acts_as_ or similar)
that provides a simple framework for mapping ActiveRecord calls to API
calls for model instances that are managed via API calls rather than a
database connection.
Thomas
--
You received this message because you are subscr
homas
On Apr 21, 5:07 pm, Michael Pavling wrote:
> On 21 April 2010 22:00, Thomas Allen wrote:
>
> > On Apr 21, 4:37 pm, Michael Pavling wrote:
> >> On 21 April 2010 20:36, Thomas Allen wrote:
>
> >> > active = request.request_uri == url
>
> >>
On Apr 21, 4:37 pm, Michael Pavling wrote:
> On 21 April 2010 20:36, Thomas Allen wrote:
>
> >active = request.request_uri == url
>
> Would using url_for() not save you a lot of hassle generating that url?
Thanks Michael, url_for was what I was looking for in place of
man
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
Is there a simple way to flatten 1:1 models so that the methods in one
are accessible from another? This attempt results in a stack depth
exception for any call to one of the explicitly defined methods:
class User < ActiveRecord::Base
has_one :contact
Contact.column_names.each do |col|
d
Thanks, that seems to be the right idea. Here's what I ultimately
settled on...the following results in "Home | Dashboard | PNC" for a
request to DashboardController#index.
class ApplicationController < ActionController::Base
def self.title item
before_filter do |controller|
controlle
I would like to be able to easily build a string. Here is how
I am doing it right now (I have omitted parts not relevant):
In the layout:
<%= title %>
Which calls:
module ApplicationHelper
def title
@title_parts.join ' | '
end
end
and @title_parts is build like so:
class Ap
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/t
Does anybody know of a way to test that the configured mail server
connection works? In a similar vein, is there a way to simply test the
database connection? I use db:migrate for that now but I'd prefer a
method that simply verifies the connection settings.
Thomas
--
You received this message b
I have two tables with ID columns that must be unsigned integers. When
I try to clone the database for testing, Rails misjudges these columns
as signed integers, and the test cannot proceed because this table
type does not accept a signed integer for these columns (Sphinx SE
document and body tabl
It appears that this is coming from my installed lib/mysql_adapter.rb
which has an incorrect signature for recreate_database (and probably
for other methods as well), so I think I have what I need to solve the
problem now.
Thomas
On Aug 28, 9:50 am, Thomas Allen wrote:
> On Aug 28, 3:23
On Aug 28, 3:23 am, Nik Cool wrote:
> > rake aborted!
> > wrong number of arguments (2 for 1)
> > /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:
> > 344:in `recreate_database'
>
> > Thanks!
> > Thomas
>
> do you have test database created ?
> --
> Posted viahttp://www.rub
Judging by the exception's location, the test environment config is
not getting loaded. Do I need to do something else to activate this
environment?
341 case abcs["test"]["adapter"]
342when "mysql"
343 ActiveRecord::Base.establish_connection(:test)
344 ActiveRecord:
Hm, I'll try explicitly setting the [nonstandard] autocomplete
attribute off in the inputs...
Thomas
On Jul 22, 9:02 am, Frederick Cheung
wrote:
> On Jul 22, 1:51 pm, Thomas Allen wrote:> Is what I'm
> attempting possible with render :partial?
>
> Have you checked wi
Is what I'm attempting possible with render :partial?
On Jul 20, 3:55 pm, Thomas Allen wrote:
> I have some simple code that renders a form to an element specified in
> form_remote_tag :update. The problem is that, if the loaded view
> matches the view to render, Rails does nothi
I have some simple code that renders a form to an element specified in
form_remote_tag :update. The problem is that, if the loaded view
matches the view to render, Rails does nothing rather than refreshing
the view (which is the desired behavior).
There is an element with id "form," also specifie
19 matches
Mail list logo