[Rails] Re: rails.vim -> killing the server?

2009-05-03 Thread Harold A . Giménez Ch .
Thin is just another webserver for ruby apps (mongrel, webrick, thin, ...) http://code.macournoyer.com/thin/ You could've done :Rscript server to accomplish the same Rick Lloyd is describing (which would default to whatever server you're using). On Sun, May 3, 2009 at 9:04 PM, 7stud -- wrote: >

[Rails] Re: MacVim and rails.vim not working

2009-04-30 Thread Harold A . Giménez Ch .
It is misleading, I'll give you that...but for future reference, the process you just went through will be very similar with any vim plugin. On Thu, Apr 30, 2009 at 6:34 PM, 7stud -- wrote: > > 7stud -- wrote: > > Harold wrote: > >> Should be simple: The "rails" folder should not be present under

[Rails] Re: MacVim and rails.vim not working

2009-04-30 Thread Harold A . Giménez Ch .
On Thu, Apr 30, 2009 at 6:10 PM, 7stud -- wrote: > > Harold wrote: > > Should be simple: The "rails" folder should not be present under > > your .vim folder. > > Stupid maintainer. Excuse me? > > > > > > > Move the plugin, doc and autoload files individually > > to each of the subfolders of .vi

[Rails] Re: Testing and SQL views.

2009-04-17 Thread Harold A . Giménez Ch .
ws, and as far as rails is concerned, they are just tables, or even better, "a thing where active record persists data"... On Fri, Apr 17, 2009 at 8:57 AM, Tim Uckun wrote: > > > On Sat, Apr 18, 2009 at 12:43 AM, Harold A. Giménez Ch. < > harold.gime...@gmail.com> wro

[Rails] Re: Testing and SQL views.

2009-04-17 Thread Harold A . Giménez Ch .
What DBMS are you using? The alternative is a "materialized view". On Fri, Apr 17, 2009 at 8:42 AM, Tim Uckun wrote: > > >> >> Name the fixtures.yml file after the actual target table, not the view. >> >> > I'll give that a shot. Thanks... > > > > > --~--~-~--~~~---~

[Rails] Re: Ridiculously Slow View Rendering

2009-04-06 Thread Harold A . Giménez Ch .
ied a bunch of different searches, and it's actually loading > > reasonably quickly still... < 500ms at least. > > > > Also, in the process I upgraded from Rails 2.2.1 to 2.3.2, so maybe > > that helped somewhat too. > > > > -Avishai > > > > On A

[Rails] Re: Ridiculously Slow View Rendering

2009-04-06 Thread Harold A . Giménez Ch .
This is good to know. "Completed in 319ms (View: 288, DB: 27)" 319ms is not hardly close to your original 11386ms. I notice that your params below do not have any of the "search" criteria ([:user][:interests], etc). If you run the view using the criteria, does performance degrade? On Mon, Apr 6,

[Rails] Re: Use fixtures within fixtures?

2009-03-29 Thread Harold A . Giménez Ch .
The finder call to the DB is redundant. How about you save yourself the trip to the db and just do one-en: id: <%= Fixtures.identify(:one) -%> locale: en name: cars On Sun, Mar 29, 2009 at 9:15 AM, Heinz Strunk < rails-mailing-l...@andreas-s.net> wrote: > Oh, I thought I could call that

[Rails] Re: Charts in Rails

2009-03-20 Thread Harold A . Giménez Ch .
> You must have glossed over the OP's requirements indeed I did. My apologies. On Fri, Mar 20, 2009 at 1:58 PM, Robert Walker < rails-mailing-l...@andreas-s.net> wrote: > > Harold wrote: > > There's plenty out there, Fusion charts free and open flash charts > > being my top choices. > > You must

[Rails] Re: Newb question...get info from the db

2009-03-09 Thread Harold A . Giménez Ch .
OK Great... You were calling the + method, which concatenates two string objects, on a User object. In your original code, the @login variable did not hold a string object, but a user object (returned by the call to User.find_by_login( ... ). Ruby was rightfully complaining that the + method was

[Rails] Re: No error but mail not sent?

2009-03-09 Thread Harold A . Giménez Ch .
Without knowing what your SMTP server is, not much we can do. One generic way is with telnet. A search for "telnet smtp send email" gives you this post: http://blogs.crsw.com/mark/archive/2006/07/06/2032.aspx Also, try locating the mail server's logs and see if that points you on the right direct

[Rails] Re: Protecting an associated record from destroying -- How To and explanation?

2009-03-09 Thread Harold A . Giménez Ch .
Another option is using the before_destroy callback to do the check: http://apidock.com/rails/ActiveRecord/Callbacks/before_destroy On Mon, Mar 9, 2009 at 9:27 AM, Ar Chron wrote: > > vimal wrote: > > Then i removed the pattern which was used by a schedule. > > How can i avoid this action. > > >

[Rails] Re: Two-to-one mappings

2009-02-15 Thread Harold A . Giménez Ch .
> > > On Feb 15, 11:16 am, Greg wrote: > > > Ah, so one follow up question: each Competitor in the competition is > > > signed up for two rounds, and needs to know which room he or she is > > > assigned. This is a has_one relationship; however, I'm not quite

[Rails] Re: Two-to-one mappings

2009-02-14 Thread Harold A . Giménez Ch .
Great! Glad it worked. On Sun, Feb 15, 2009 at 1:57 AM, Greg wrote: > > Cool! Harold, your solution strikes me as being exactly the way to do > it. I've implemented it, and things seem to be sailing smoothly. > Thanks a lot to both of you. > > Sincerely, > > Greg > > On Feb 14, 11:47 pm, Harol

[Rails] Re: Schedule job in rails

2009-02-14 Thread Harold A . Giménez Ch .
No quite like that. If you're sending an HTTP GET request to any URL, you would pass parameters to the URL itself, something like: http://localhost:3000/cron?param1=value1¶m2=value2 etc What looks attractive to me about this approach (of using wget via cron instead of a rake task) is that you are

[Rails] Re: detecting rake db:migrate ?

2009-02-05 Thread Harold A . Giménez Ch .
Thanks! That would work, for now. I still have the itch though. If anyone knows, do tell. Thanks again, -H On Thu, Feb 5, 2009 at 4:22 PM, Ryan Bigg wrote: > > There is a model class method like table_exists? That you can use to > check ifthe table exists and then only run the code if it does

[Rails] Re: ActiveRecord can validates "select" querys?

2009-02-02 Thread Harold A . Giménez Ch .
br) | http://blog.codevader.com/ (en) > > > > On Mon, Feb 2, 2009 at 2:42 PM, Harold A. Giménez Ch. > wrote: > > In that case, I don't know of a way to reuse an ActiveRecord validation > > before running a find. You don't even have a ActiveRecord object at tha

[Rails] Re: ActiveRecord can validates "select" querys?

2009-02-02 Thread Harold A . Giménez Ch .
-H On Mon, Feb 2, 2009 at 12:30 PM, Daniel López < rails-mailing-l...@andreas-s.net> wrote: > > Harold A. Giménez Ch. wrote: > > Sounds like something you can do with ActiveRecord validations: > > > > > http://api.rubyonrails.org/classes/ActiveRecord/Valida

[Rails] Re: ActiveRecord can validates "select" querys?

2009-02-02 Thread Harold A . Giménez Ch .
Sounds like something you can do with ActiveRecord validations: http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html for example: validates_numericality_of :some_numer validates_length_of :something_else, :in => 3..12 You can use validate_format_of :a_date (and specify

[Rails] Re: How to pass parameters to a script in "lib" from termina

2009-01-09 Thread Harold A. Giménez Ch.
Well, you have to play nice with the "rules" of the command line (like no spaces etc). Also note that whatever comes into your rake task is simply a string. You would have to parse that string and build any object you need, such as a hash or array... Any code on how you're handling the params? On

[Rails] Re: how to monkeypatch Hash's []= method

2009-01-06 Thread Harold A. Giménez Ch.
I was focusing on the "=" being the problem... Worked nicely. Many thanks! On Tue, Jan 6, 2009 at 7:20 PM, Frederick Cheung wrote: > > > On 6 Jan 2009, at 23:56, Harold A. Giménez Ch. wrote: > > > Thanks for the response. > > > > So how in the world is t

[Rails] Re: how to monkeypatch Hash's []= method

2009-01-06 Thread Harold A. Giménez Ch.
Thanks for the response. So how in the world is this implemented? The []= method's source code is in C. Other classes override it in a subclass, which works fine, but how would I go about implementing a method that works like the Hash class' []= method? I'm not sure what you mean by "skipping ali

[Rails] Re: SuperInPlaceControl

2008-12-06 Thread Harold A. Giménez Ch.
You are absolutely right, it's just JavaScript, and digging under the hood uncovered my error. I also modified the plugin slightly to accept a :url parameter in order to specify a controller, action, etc. Just more flexible. Thanks, -H On Fri, Dec 5, 2008 at 4:42 PM, Hassan Schroeder <[EMAIL PROT