[Rails] Working with dynamic fields

2013-08-14 Thread Diego N.
Hi, I'm developing a app with dynamic field using hstore ( postgres ). The app works great, but now, i'm trying to implement validations. my code is: #model .. def initialize_custom_fields class_eval do validates field.f, :presence => true end end .. #user controller def create user = U

[Rails] Re: Local Gem Repository will not work

2013-08-14 Thread ron mm
It is worth mentioning that Artifactory Pro, starting at version 3.0.3, fully supports RubyGems local, remote and virtual repositories. Remote repositories can eliminate the vulnerabilities caused by bad/slow networking to rubygems.org. Local repositories can be used for hosting in-house gems in

[Rails] Re: What's the proper way to delete all associated children in one SQL statement, with AR 4.0 ?

2013-08-14 Thread Savater Sebastien
I knew I can do that (last example, I made a bad copy/paste of arguments :)) Item.where(parent: parent.id).delete_all But I hoped we can use associations, which offering a better *readability*. In Rails 3, you can simply make : parent.items.delete_all Otherwise, I already use :dependent op

[Rails] Re: Nginx & Unicorn setup

2013-08-14 Thread Exel Dev
Dwight Spencer wrote in post #1118596: > Hi Pardeep, > > I'm glad to help. I did get to review both of the gists you posted up > and your nginx configuration does look proper. This leads me to suspect > there is a config issue with unicorn. Do you have a gist of the unicorn > config I can look at?

Re: [Rails] Added new Rails controller using “generate controller” but can't load page

2013-08-14 Thread Colin Law
On 13 August 2013 16:30, Dan D. wrote: > I have a Rails app that has only consisted of backend code so far (a little > custom workflow engine, Redis, foreman, etc). Today I tried to add the first > controller to the application, but I can't get the new controller to load. > > I used: > > rails gen

Re: [Rails] I'm making online test program with Rails 3.

2013-08-14 Thread Colin Law
On 14 August 2013 06:09, Jaehun Shin wrote: > Hi. This is my first post. > > First of all, I apologize my poor English. Actually, I'm not confident > whether I can tell what I think, cause English is not my first language. Don't worry, you are doing ok. > [snip] > > but I'm not sure whether ans