Hi,
Is there a way to use namespaces inside nested resources? For example,
I have:
resources :users do
resources :tags
end
and I'd like to place the tags controller inside controllers/users,
with the equivalent for templates.
If I try this:
resources :users do
namespace :users do
resou
I decided to create a restful controller for the tags, nested in the
users resources, and not associated with any model:
resources :users do
resources :utags, :only => [:index, :create, :destroy]
end
I'm using these routes in the views:
<%= link_to 'destroy', user_utag_path(@user, tag)
Hi,
This may seem a silly question, but I didn't find an elegant solution
to manage a user's tag collection. Perhaps I'm missing something, I'd
like to know if there is a better way to handle it are.
The configuration is pretty standard stuff:
user.rb:
has_many :user_tags, :dependent => :destr
On Aug 26, 11:56 am, Adriano Nagel wrote:
> has_many :entries, :dependent => :delete_all
> save! # will fail if an exception is thrown below
Nothing like explaining your problem to others :-)
I figure feed.save tries to save the associated entry and that throws
the exception again
Hi,
I'm a bit puzzled with an ActiveRecord::StatementInvalid exception
that's apparently being thrown twice.
I'm using Rails 2.3.3 and Postgres, and inside the Feed Model I have
something like:
has_many :entries, :dependent => :delete_all
def process_feed
...
process_feed_entries
# log s
For the record...
On Jan 16, 4:17 pm, Adriano wrote:
> TypeError: wrong argument type String (expected Fixnum)
[snip]
> def initialize(string)
> @value = BigDecimal(string.sub(/,/, '.'))
> end
The problem was that value object can be initialized with a string
(from the form) or with a
6 matches
Mail list logo