mp; MyTest.my_test.count > 1 )
Don't know if this the most elegant way to do this but It really
worked.
Thank you.
--
Alberto
On May 21, 12:57 pm, cardinallijr wrote:
> Colin,
>
> I understood what you suggested about using named scope and I'll try
> thislater. About
not compulsory, it is just for
> tidiness.
>
> You may have to worry about what happens if two people try to update the db
> at the same time though. I am not sure of the best way to solve that one.
>
> 2009/5/20 cardinallijr
>
>
>
> > Hi all,
>
> > I
Hi all,
I'm trying to validate my model through equal values occuring a number
of times on the same column. I think that I have to use a custom
validation, right? I tried to use it but had no success.
For example, that's the table:
class MyTest < ActiveRecord::Migration
def self.up
create
Johny,
Do you have imagemagick installed on windows ? If you want to
manipulate images with paperclip, imagemagick has to be installed.
Maybe in your linux distribution you already have imagemagick
installed.
Give us more details about the problem.
--
Alberto
On Dec 20, 4:25 am, Johny ben
wrot
oes it really needs to be inserted inside the controller ?
--
Alberto
On Nov 25, 11:23 am, cardinallijr <[EMAIL PROTECTED]> wrote:
> Rick,
>
> You are right. I tried to do what you suggested with a new project and
> it really worked. But with my project it doesn´t work. Something
@product.destroy
>
> respond_to do |format|
> format.html { redirect_to admin_products_path }
> format.xml { head :ok }
> end
> end
> =
>
> And it works - check out this site:
>
> http://icebergist.com/posts/restful
.rb file?
>
> 2008/11/25 cardinallijr <[EMAIL PROTECTED]>
>
>
>
>
>
> > Ryan,
>
> > Nothing in application.rb. I migrated this app from rails 1.2 and now
> > I want to create an admin control panel.
>
> > admin/products_controller.rb:
>
Ryan,
Nothing in application.rb. I migrated this app from rails 1.2 and now
I want to create an admin control panel.
admin/products_controller.rb:
--
class Admin::ProductsController < ApplicationController
layout 'admin'
def index
list
rende
you have to look at how you got here (in the view) and what
> was your assumption how @products got to have a value associated with
> it.
>
> This would be easier for you if you single stepped through a
> debugger. You might consider it time well spent to learn how.
>
> Rick
>
&
"admin/product"}?
>
> > rake routes on your routes.rb shows:
>
> > DELETE /admin/products/:id
> > {:action=>"destroy", :controller=>"admin/products"}
>
> > So you should be able to use:
>
> > <%
Hi all,
I'm trying to implement an admin control panel for my application and
everything seems to work fine, except when I try to call the destroy
method from the view. I really tried to search for a solution, reading
some routing rails articles, but can't figure out what's going on.
When I call
11 matches
Mail list logo