Re: [Rails] Sorting posts

2010-04-21 Thread Juan José Vidal
get the error Mcolumn "total_replies" does not exist > > I know the column doesn't exist, but the question is, how can I get > the 'total_replies' to behave as a column. > > Thanks, > > Dan > -- Juan José Vidal Agustín ATICA - Sección de Telemática Un

[Rails] Re: OCR project in Gsoc

2009-03-24 Thread Juan José Vidal
Hi, What about Google Tesseract??? http://code.google.com/p/tesseract-ocr/ Harold escribió: > There are many ways to accomplish this, none of them are easy... > > There's ai4r's backpropagation nueural nets implementation, with a > simple OCR example at http://ai4r.rubyforge.org/neuralNetworks

[Rails] Re: Cancel the last migration?

2009-02-26 Thread Juan José Vidal
If you want to cancel more steps... rake db:rollback STEP=3 Guillaume Loader escribió: > Hello everyone! > > How can I cancel the last migration? > > Thank you! > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Help needed in rails project

2009-02-09 Thread Juan José Vidal
Tripathy escribió: > No its not working yet, can you please give an example how this line > should be? > Dont mind, I am not very competent, just learning . :( > so may be missing something > > Manisha Tripathy wrote: > >> ok I am trying again >> >> Juan

[Rails] Re: Help needed in rails project

2009-02-09 Thread Juan José Vidal
You must put your path in this line... Manisha Tripathy escribió: > still its not working. :(( > > > Juan José Vidal wrote: > >> Obviously. >> >> Manisha Tripathy escribió: >> > > --~--~-~--~~~---~--~--

[Rails] Re: Help needed in rails project

2009-02-09 Thread Juan José Vidal
Obviously. Manisha Tripathy escribió: > yes, do I need to uncomment it? > > > Juan José Vidal wrote: > >> See this line in your config/environment.rb >> >> # Add additional load paths for your own custom dirs >> # config.load_paths += %W( #{RAILS_R

[Rails] Re: Help needed in rails project

2009-02-09 Thread Juan José Vidal
See this line in your config/environment.rb # Add additional load paths for your own custom dirs # config.load_paths += %W( #{RAILS_ROOT}/extras ) Manisha Tripathy escribió: > Hi friends, > > I need to create some additional ruby files for some other functions > inside a rails project. So I cr

[Rails] Re: how to style currently active link

2009-02-09 Thread Juan José Vidal
In this video you'll see the behaviour you're looking for... (min 33) http://s3.amazonaws.com/lr_screencasts/learningrails-17.mov Adam Akhtar escribió: > Thank you both for your responses. > > Ive gone with Juans as it does what i need is shorter code. The only one > problem is that it results

[Rails] Re: sorting a has_many collection

2009-02-09 Thread Juan José Vidal
You could use named_scope to get more complexity. I think that's a possibility. http://www.locomotivation.com/blog/2008/08/25/simplify-activerecord-aggregates-and-other-goodies-via-named-scope.html bingo bob escribió: > That's ideal! thanks. > > Follow up question, what if I want to override th

[Rails] Re: sorting a has_many collection

2009-02-09 Thread Juan José Vidal
class School < AR has_many :reviews, :order => 'created_at DESC' end class Review < AR belongs_to :school end If you use @school.reviews you'll get the desired effect MaD escribió: > this should work: > @school.reviews.sort_by { |cc| - cc.updated_at.to_i } > > > > --~--~-~-

[Rails] Re: how to style currently active link

2009-02-09 Thread Juan José Vidal
I think that you're looking for something like that <%= link_to_unless_current('Add contact', new_contact_url, :class => 'adduser') { link_to('Add contact', new_contact_url, :class => 'selected') } %> http://apidock.com/rails/ActionView/Helpers/UrlHelper/link_to_unless_current Adam Akht

[Rails] Re: a series of views (how to flow)

2009-01-29 Thread Juan José Vidal
I think that you could use a plugin like acts_as_wizard for your purpouses. http://github.com/adkron/actsaswizard/tree/master http://blogs.smarteguru.com/2008/09/get-wizard-feel-with-acts-as-wizard-in-ruby-on-rails/ bingo bob escribió: > All things being equal which method would you favour? > >

[Rails] Re: Migration Broken?? *FIXED*

2009-01-27 Thread Juan José Vidal
You could use this script to rename all your migrations with the new format. I've used this chunk of code in a project (undeployed yet) to normalize the migrations names (01_, 02_ ... format and UTC format) Maybe could be useful for you. #!/usr/bin/env ruby require 'find' require 'fileutils' r

[Rails] Re: Rails Dev Conf

2009-01-27 Thread Juan José Vidal
Hola Xavier, If you need some help... We have the dependencies of the university of Murcia to celebrate the event, if you want... What do you need Un saludo! Phillip Oertel escribió: > De puta madre! Great idea. > > If you plan to use the conference software written for > conferenciarail

[Rails] XMPP4R and Openfire

2009-01-26 Thread Juan José Vidal
My app sends IM with XMPP4R with Jabber accounts perfectly with this code, but when I want to use an Openfire problem I get an error of authorization jid = Jabber::JID.new('myu...@example.com') @client = Jabber::Client.new(jid) @client.connect @client.auth('xx') The error:

[Rails] Re: Relationships in Rails...

2009-01-26 Thread Juan José Vidal
I think that the best solution to your problem is to use acts_as_tree http://github.com/rails/acts_as_tree/tree/master Martin Hawkins escribió: > Sounds like a many to many relationship, in which case you need to > declare has_and_belongs_to_many on both people and children. The > relationship t

[Rails] Re: Rails plugin for directions from Google Maps?

2009-01-22 Thread Juan José Vidal
Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional http://www.apress.com/book/view/1590597877 http://geokit.rubyforge.org/ admanb escribió: > Does such a thing exist? YM4R only seems to do markers. > > > --~--~-~--~~~---~--~---

[Rails] Re: Download a content as a pdf format

2009-01-21 Thread Juan José Vidal
You can use flying saucer (a xhtml renderer java based) too, using XHTML as pdf template. Recently is available as a rails plugin: http://github.com/dagi3d/acts_as_flying_saucer/tree/master A simple app that uses flying saucer to generate invoices (Spanish) http://github.com/dagi3d/facturails/t