[Rails] Re: Trying to do a report with a list of zip codes and getting stuck..

2010-09-09 Thread Bob Smith
On Sep 10, 12:41 am, Bob Smith wrote: > I'm trying to get a list of zip codes in my database with > > zipstring = sprintf("select distinct zip from visits,households where > " + >   "households.id=visits.household_id and visits.month='%2d' and > visits.year = '%4d' " + >  "and visits.monthly = 1 o

[Rails] Trying to do a report with a list of zip codes and getting stuck..

2010-09-09 Thread Bob Smith
I'm trying to get a list of zip codes in my database with zipstring = sprintf("select distinct zip from visits,households where " + "households.id=visits.household_id and visits.month='%2d' and visits.year = '%4d' " + "and visits.monthly = 1 order by households.zip;", datestart.month, datestart

Re: [Rails] Re: RMagick to_blob display via AJAX call

2010-09-09 Thread radhames brito
Lol On Thu, Sep 9, 2010 at 7:24 PM, Rob Biedenharn wrote: > > On Sep 9, 2010, at 3:12 PM, radhames brito wrote: > > can you explain why arent you using paperclip? i use it with imagemagick > and can easily convert my file to almost any format with very easy. > > > Well, he's not starting with a f

Re: [Rails] Re: Polymorphic advice for this design

2010-09-09 Thread radhames brito
watch this http://railscasts.com/episodes/47-two-many-to-many On Thu, Sep 9, 2010 at 9:16 PM, radhames brito wrote: > dont touch the type fields. > > If you have a child model that you have to attach to different models use > polymorphic associations. > if you have 2 models with a few different

Re: [Rails] Re: Polymorphic advice for this design

2010-09-09 Thread radhames brito
dont touch the type fields. If you have a child model that you have to attach to different models use polymorphic associations. if you have 2 models with a few different fields use STI. if it guess too clomplex is means you choose wrong and you were so suppose to use the other kind of association

Re: [Rails] Re: text_field and :onchange

2010-09-09 Thread radhames brito
try to go unobstrusive On Thu, Sep 9, 2010 at 5:46 PM, Shandy Nantz wrote: > :onkeyup does what I want. wouldn't you know no more than five minutes > after I post this a light goes on and I figure it out. > > -S > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message bec

Re: [Rails] Re: Freeze an attribute?

2010-09-09 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > > > On Sep 9, 2:11 am, "Jeffrey L. Taylor" wrote: > > Is it possible to to freeze a single attribute of an ActiveRecord (Rails > > 2.3.5).  Hopefully in a way that isn't deprecated in 2.3.8 or 3.0. > > > attr_readonly ? > Not quite what I wanted, but interesting no

Re: [Rails] Re: RMagick to_blob display via AJAX call

2010-09-09 Thread Rob Biedenharn
On Sep 9, 2010, at 3:12 PM, radhames brito wrote: can you explain why arent you using paperclip? i use it with imagemagick and can easily convert my file to almost any format with very easy. Well, he's not starting with a file, for one thing. -Rob On Thu, Sep 9, 2010 at 2:07 PM, Freder

[Rails] Re: Simple Captcha - files still in "/tmp" directory and not displaying

2010-09-09 Thread Andy
Found the solution: https://rails.lighthouseapp.com/projects/8994/tickets/4063-rails-30-beta1-send_file-with-0-byte On Sep 9, 6:59 pm, Andy wrote: > I'm starting to narrow down the problem. > > The files are being created in the "/tmp" folder. > > But when image.rb passes it up to simple_captcha

[Rails] Re: Simple Captcha - files still in "/tmp" directory and not displaying

2010-09-09 Thread Andy
I'm starting to narrow down the problem. The files are being created in the "/tmp" folder. But when image.rb passes it up to simple_captcha_controller.rb, the files are coming through empty. The versions in "/tmp" are not empty files though. I'm using a CentOS server I configured myself (rather

Re: [Rails] Re: Re: Re: i18n assets management / translation UI

2010-09-09 Thread Walter McGinnis
I take your points and I have certainly considered many of them. Like many things, there are design tradeoffs and you have to weigh them in your particular situation. I'm quite aware that linguistically these patterns aren't always useful and that is why they can be opted out of easily. They hav

[Rails] Re: Polymorphic advice for this design

2010-09-09 Thread Christian Fazzini
Redhames, got it thanks! Have tested this and now seems to work. Even the type field is put in automatically when the form submits. Is this normal that the type field saves as "CitySuggestion" and "BusinessSuggestion" respectively? Can I change the way it saves, as "city" or "business", instead?

[Rails] Re: text_field and :onchange

2010-09-09 Thread Shandy Nantz
:onkeyup does what I want. wouldn't you know no more than five minutes after I post this a light goes on and I figure it out. -S -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this

[Rails] text_field and :onchange

2010-09-09 Thread Shandy Nantz
Hi all, I have this text_field that needs to be filled out before a form can be submitted. To do this I added an :onchange attribute that basically checks to see if the value of the field is blank, if it is then the submit button on the form gets hidden, else it is shown. The idea also being that

[Rails] Re: Multiple Routes

2010-09-09 Thread Creative Technologist
Perfect, good video link, thanks radhames! On Sep 9, 1:52 pm, radhames brito wrote: > use the requirement attribute in the routes and use friendly_id gem, > > http://railscasts.com/episodes/70-custom-routes > > this shows how the use requirement in routes , remember to put specific > routes on to

[Rails] Simple Captcha - files still in "/tmp" directory and not displaying

2010-09-09 Thread Andy
I'm trying to use the Rails3 Simple Captcha version from here: http://github.com/galetahub/simple-captcha It's working 100% fine on my local environment. In Production, I had to point the "convert" command to the correct directory and then reinstall ImageMagick with the FreeType lib. Now I'm not

[Rails] Re: 406 Not Acceptable with swfupload

2010-09-09 Thread Sean Six
I added env['HTTP_ACCEPT'] = '*/*' into my middleware. It seems to work correctly now. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t

[Rails] NoMethodError in User sessionsController#create

2010-09-09 Thread Ruby Rube
Having a frustrating go at authenticating a user, pretty sure it must have something to do with gem version conflicts, but I can't seem to find a solution that works. No matter what username & password that is entered into the login form I get the same error screen: NoMethodError in User sessions

[Rails] Re: Integration tests failing with restful_authentication

2010-09-09 Thread Marnen Laibow-Koser
Jack Senechal wrote: > I recently upgraded to Rails 2.3.8 from 2.1.0 (not sure if that has > anything to do with it though), and my integration tests are no longer > able to do anything requiring the user to be logged in. [...] > I have upgraded restful_authentication > plugin, I have gone through

[Rails] Re: Is it possible to do date arithmetic in an active record query without using custom sql ?

2010-09-09 Thread Robert Walker
voidstar wrote: > def FilterUtils.apply_year_filter readings, years > readings.each {|reading| > if( reading.timestamp != nil && years != nil && > years.index(reading.timestamp.year) == nil ) > readings.delete(reading) > end > } > readings > end I realize that yo

[Rails] Integration tests failing with restful_authentication

2010-09-09 Thread Jack Senechal
I recently upgraded to Rails 2.3.8 from 2.1.0 (not sure if that has anything to do with it though), and my integration tests are no longer able to do anything requiring the user to be logged in. The tests can log in successfully, but when another request is made, the user is no longer recognized as

Re: [Rails] Re: Hello

2010-09-09 Thread shahroon ali
Agree with Ar Chron...galharth please do some effort and you will get everything and anything on google...Installation seems difficult but actually it is not that difficult at all. Shahroon On Thu, Sep 9, 2010 at 6:19 PM, Ar Chron wrote: > There are probably a bazillion tutorials out on the web

Re: [Rails] Re: Re: Re: Textmate vs. MacVim

2010-09-09 Thread Colin Law
On 9 September 2010 21:28, Greg Donald wrote: > On Thu, Sep 9, 2010 at 3:21 PM, Michael Pavling wrote: >> Because that's what Ruby, Rails and OSS is about: elitism. >> >> No one in this thread mentioned anything about "i needz kode >> compleeshun" - you're jumping into prejudicial, and pejorative

[Rails] rails3 form_for adding element class...because...?

2010-09-09 Thread William Hatch
When I use a form_for, it's adding an element class attribute on the form, which is mucking up the design. After some digging, I came upon this thread: http://www.mail-archive.com/rubyonrails-talk@googlegroups.com/msg61763.html Which appears to indicate that the class attribute is defined in the

Re: [Rails] Re: Re: Re: Textmate vs. MacVim

2010-09-09 Thread Greg Donald
On Thu, Sep 9, 2010 at 3:21 PM, Michael Pavling wrote: > Because that's what Ruby, Rails and OSS is about: elitism. > > No one in this thread mentioned anything about "i needz kode > compleeshun" - you're jumping into prejudicial, and pejorative rants. Keeping system resource usage low isn't elit

Re: [Rails] Re: Re: Re: Textmate vs. MacVim

2010-09-09 Thread Michael Pavling
On 9 September 2010 21:09, Greg Donald wrote: > It's been my experience programmers *cough* who require an IDE are > usually the most useless people to have on the team. > > I'd take an Emacs loving, API-knowing coder over a "I need Netbeans > 'cause I need code completion" wanna-be coder any day

[Rails] Re: NameError: uninitialized constant Vimeo

2010-09-09 Thread Rafael Dalprá
It is Rails 2, and I did everything correctly. Actually, I solved the problem. It didn't load the class because it didt expect some deprecated dependencies, so I contacted the gem developer and he solved the problem, as you can see here: http://github.com/matthooks/vimeo/issues So, thanks for t

[Rails] (JOB) Ruby on Rails Programmer

2010-09-09 Thread rick
I am looking for someone to work on a project I have that was developed in Ruby On Rails. Can you give me some guidance on hiring some one I would like for them to be located in the St. Louis Missouri area. Any suggestions would be a help. Thanks Rick 314-614-2100 or rbl...@blizzardpros.com --

Re: [Rails] Re: Re: Re: Textmate vs. MacVim

2010-09-09 Thread Greg Donald
On Thu, Sep 9, 2010 at 3:01 PM, Marnen Laibow-Koser wrote: > I don't really agree there: for environments where I *do* benefit from > IDEs (i.e. not Rails), code completion is not the major benefit. > Automating repetitive tasks (such as complex builds), switching between > related files, C-x to

[Rails] Re: Re: Re: Textmate vs. MacVim

2010-09-09 Thread Marnen Laibow-Koser
Greg Donald wrote: > On Thu, Sep 9, 2010 at 2:50 PM, Marnen Laibow-Koser > wrote: >> NetBeans is great >> where an IDE is wanted -- which it isn't for Rails development. > > Learn the API, then you won't need an IDE. > I don't really agree there: for environments where I *do* benefit from IDEs

Re: [Rails] Re: Re: Textmate vs. MacVim

2010-09-09 Thread Greg Donald
On Thu, Sep 9, 2010 at 2:50 PM, Marnen Laibow-Koser wrote: > NetBeans is great > where an IDE is wanted -- which it isn't for Rails development. Learn the API, then you won't need an IDE. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to

[Rails] Re: Re: Textmate vs. MacVim

2010-09-09 Thread Marnen Laibow-Koser
radhames brito wrote: > i use netbeans but i think there is a huge overhead Agreed. That's why I use KomodoEdit for Rails work. NetBeans is great where an IDE is wanted -- which it isn't for Rails development. > and i olso have to > add > the nbproject folder to my .gitignore file True. So

[Rails] Re: acts_as_list query

2010-09-09 Thread Marnen Laibow-Koser
Ben wrote: > When moving an item around within the list, shouldn't EVERY item have > its optimisitc locking field updated? Currently, only the item that is > moved has its optimisitc locking field updated, but every item has its > position field changed so surely they too should have their optimist

Re: [Rails] Is it possible to do date arithmetic in an active record query without using custom sql ?

2010-09-09 Thread Colin Law
On 9 September 2010 19:24, voidstar wrote: > Hi, > > I currently have a large array of model objects (around 5000 this > could grow to be in the 100k range) which have a date attribute.  I > want to filter this objects if one of their date attribute falls into > an array of years selected by the u

Re: [Rails] Re: Textmate vs. MacVim

2010-09-09 Thread Michael Pavling
On 9 September 2010 20:08, radhames brito wrote: > i use netbeans but i think there is a huge overhead and i olso have to add > the nbproject folder to my .gitignore file That's not exactly a big problem is it? But you can set the Netbeans folder to be at any location you like - it doesn't have t

[Rails] Rails3: jquery-rails gem sets 'config.action_view.javascript_expansions' but cannot be overriden in 'config/application.rb'

2010-09-09 Thread Christiaan Van den Poel
Hello, I've created a new Rails3 app and I'm using jQuery instead of prototype. Gemfile: gem 'jquery-rails' in my config/application.rb I want do the following: config/application.rb if Rails.env.production? config.action_view.javascript_expansions[:defaults] = %w(jquery.min rails applicat

Re: [Rails] Is it possible to do date arithmetic in an active record query without using custom sql ?

2010-09-09 Thread radhames brito
this kind of thing are better to left in the db server since is much faster. and by the why you can do date arithmetic but dont do it that way since you have a lot of records returned On Thu, Sep 9, 2010 at 2:24 PM, voidstar wrote: > Hi, > > I currently have a large array of model objects (aroun

Re: [Rails] Re: RMagick to_blob display via AJAX call

2010-09-09 Thread radhames brito
can you explain why arent you using paperclip? i use it with imagemagick and can easily convert my file to almost any format with very easy. On Thu, Sep 9, 2010 at 2:07 PM, Frederick Cheung wrote: > > > On Sep 9, 5:54 pm, John Chufar wrote: > > > > I still cannot see how to possibly pass a blob

Re: [Rails] Re: rails 3 gives me allot of issues?

2010-09-09 Thread radhames brito
try reading on html safe feature of rails 3 On Thu, Sep 9, 2010 at 2:00 PM, Frederick Cheung wrote: > > > On Sep 9, 4:34 pm, Jamal Soueidan wrote: > > Hello, > > > > Is there any configuration in Rails 3 since it destroy my HTML when i > > try to print something out ? > > > > Example: > > > > <

[Rails] Re: rails 3 gives me allot of issues?

2010-09-09 Thread Robert Walker
radhames brito wrote: > are you using simple navigation ?? in that case navigation [{:users => > admin_users_path}] is a method but it looks like the gem is not rails 3 > ready > > go to http://www.railsplugins.org/ and see if the gem/plugin is rails 3 > ready http://www.railsplugins.org/plugins/

Re: [Rails] Re: Textmate vs. MacVim

2010-09-09 Thread radhames brito
i use netbeans but i think there is a huge overhead and i olso have to add the nbproject folder to my .gitignore file On Thu, Sep 9, 2010 at 3:04 PM, Len Smith wrote: > using any type of folder navigation is way too slow for me. i personally > love PeepOpen for navigating, but there are other pl

Re: [Rails] Re: Polymorphic advice for this design

2010-09-09 Thread radhames brito
yes thats rigth, everything will behave as if you had 2 tables , is normal RoR from now on. yes dont be afraid to ask. On Thu, Sep 9, 2010 at 1:06 PM, Christian Fazzini < christian.fazz...@gmail.com> wrote: > Thanks Radhames. Ok I got it up to there. I am assuming since we are > creating control

Re: [Rails] Re: Textmate vs. MacVim

2010-09-09 Thread Len Smith
using any type of folder navigation is way too slow for me. i personally love PeepOpen for navigating, but there are other plugins to do the same thing. if i want to edit user controller i just do "COMMAND+T" "uco" and i'm editing it a second later. macvim can be prettier and much more powerful

[Rails] Re: Rspec-rails setup in Rails 3

2010-09-09 Thread Lee Smith
Yes, here's the example setup I've put together. I'm using a Post model and posts_path definitely exists. http://gist.github.com/572213 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t..

[Rails] 406 Not Acceptable with swfupload

2010-09-09 Thread Sean Six
-flash_session_cookie_middleware.rb require 'rack/utils' class FlashSessionCookieMiddleware def initialize(app, session_key = '_session_id') @app = app @session_key = session_key end def call(env) if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/ req = Rack::

[Rails] Is it possible to do date arithmetic in an active record query without using custom sql ?

2010-09-09 Thread voidstar
Hi, I currently have a large array of model objects (around 5000 this could grow to be in the 100k range) which have a date attribute. I want to filter this objects if one of their date attribute falls into an array of years selected by the user. I wrote the code to do this in ruby land: def F

[Rails] Re: Re: RMagick to_blob display via AJAX call

2010-09-09 Thread John Chufar
Rob Biedenharn wrote: > On Sep 9, 2010, at 7:34 AM, radhames brito wrote: > >> right and also >> >> <%= image_tag url_for(:controller => "tabs", :action >> => "watch_text", :id => 0) %> >> >> the image tag should point to a path in the server and the image >> should be serve by the webserver no

[Rails] Re: RMagick to_blob display via AJAX call

2010-09-09 Thread Frederick Cheung
On Sep 9, 5:54 pm, John Chufar wrote: > > I still cannot see how to possibly pass a blob through ajax response, so > this is the my simple (NOT effective approach) versus memory storage. > I think the root of the problem you are grappling with is that putting an image on a page requires two htt

[Rails] Re: rails 3 gives me allot of issues?

2010-09-09 Thread Frederick Cheung
On Sep 9, 4:34 pm, Jamal Soueidan wrote: > Hello, > > Is there any configuration in Rails 3 since it destroy my HTML when i > try to print something out ? > > Example: > > <%= navigation [{:users => admin_users_path}] %> > > >
  • href="/admin/users">users
  • > > > I have t

    Re: [Rails] Rspec-rails setup in Rails 3

    2010-09-09 Thread Rob Biedenharn
    On Sep 9, 2010, at 12:22 PM, Lee Smith wrote: I'm having a hard time getting rspec-rails setup in a Rails 3 app. I'm using ruby 1.9.2, rails 3.0.0 and rspec-rails 2.0.0.beta.20. In my integration test, I'm using webrat to test a "visit" to a page. I get an "undefined local variable" error for

    [Rails] Re: Polymorphic advice for this design

    2010-09-09 Thread Christian Fazzini
    Thanks Radhames. Ok I got it up to there. I am assuming since we are creating controllers for city_suggestions and business_suggestions, we will also need to create view for them respectively? i.e. /app/views/ city_suggestions and /app/views/business_suggestions right? I appreciate your patience a

    Re: [Rails] Re: rails3 routes.rb DSL deprecation warning

    2010-09-09 Thread radhames brito
    gem cleanup i think you have an old version of a dependency On Thu, Sep 9, 2010 at 12:18 PM, James Byrne wrote: > James Byrne wrote: > > During testing with Rails3 I am seeing this warning: > > > > DEPRECATION WARNING: You are using the old router DSL which will be > > removed in Rails 3.1. Ple

    Re: [Rails] Re: Textmate vs. MacVim

    2010-09-09 Thread Jeremy Chase
    I have been a vi/vim user for 15 years, and am a huge fan. However, even after adding snippet support, using rails.vim, and using the directory pane, editing Rails applications is tedious compared to using Textmate. Essentially, the directory pop-out makes file manipulation too easy to not use. So

    [Rails] Problem with unexpected nil in assert_select

    2010-09-09 Thread James Byrne
    I am running cucumber features against a Rails 3 branch and I have this step definition (which works fine in Rails-2.3.8): When /should see (?:an|the) authentication request message/ do puts("This is the response: #{response.body}") selector = "#authentication_request" expected = true me

    [Rails] Rspec-rails setup in Rails 3

    2010-09-09 Thread Lee Smith
    I'm having a hard time getting rspec-rails setup in a Rails 3 app. I'm using ruby 1.9.2, rails 3.0.0 and rspec-rails 2.0.0.beta.20. In my integration test, I'm using webrat to test a "visit" to a page. I get an "undefined local variable" error for the route: visit new_articles_path Have I misse

    Re: [Rails] Re: Textmate vs. MacVim

    2010-09-09 Thread Greg Donald
    On Thu, Sep 9, 2010 at 1:56 AM, Fidel Viegas wrote: > The thing about Vim or Emacs, is that they are not ordinary editors. > They are modal editors. Emacs isn't modal. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "R

    [Rails] Re: rails3 routes.rb DSL deprecation warning

    2010-09-09 Thread James Byrne
    James Byrne wrote: > During testing with Rails3 I am seeing this warning: > > DEPRECATION WARNING: You are using the old router DSL which will be > removed in Rails 3.1. Please check how to update your routes file at: > http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/. > (call

    Re: [Rails] Syntax with link_to using block, remote, parameters and class/id

    2010-09-09 Thread radhames brito
    yeah, you were passing a hash and not a helper method On Thu, Sep 9, 2010 at 11:39 AM, William K. Hatch Jr. < stompinwi...@gmail.com> wrote: > > > On Sep 9, 2010, at 11:28 AM, radhames brito wrote: > > > change :url to url_for > > Thanks, that did it. Man, that was most frustrating;-) > > > > On

    Re: [Rails] rails 3 gives me allot of issues?

    2010-09-09 Thread radhames brito
    are you using simple navigation ?? in that case navigation [{:users => admin_users_path}] is a method but it looks like the gem is not rails 3 ready go to http://www.railsplugins.org/ and see if the gem/plugin is rails 3 ready On Thu, Sep 9, 2010 at 11:40 AM, radhames brito wrote: > what is nav

    Re: [Rails] rails 3 gives me allot of issues?

    2010-09-09 Thread radhames brito
    what is navigation??? because i bet is not an object, so rails thinks is html and is scaping it, if navigation is text the way to do it is <%="navigation #{:users => admin_users_path}"%> On Thu, Sep 9, 2010 at 11:34 AM, Jamal Soueidan wrote: > Hello, > > Is there any configuration in Rails 3 sin

    Re: [Rails] Syntax with link_to using block, remote, parameters and class/id

    2010-09-09 Thread William K. Hatch Jr.
    On Sep 9, 2010, at 11:28 AM, radhames brito wrote: > change :url to url_for Thanks, that did it. Man, that was most frustrating;-) > > On Thu, Sep 9, 2010 at 10:55 AM, William Hatch wrote: > Rails 3rc, Ruby 1.9.2 > > Newish to rails; very new to rails3 > > I'm trying to create a link using

    [Rails] rails 3 gives me allot of issues?

    2010-09-09 Thread Jamal Soueidan
    Hello, Is there any configuration in Rails 3 since it destroy my HTML when i try to print something out ? Example: <%= navigation [{:users => admin_users_path}] %>
  • users
  • I have taken those from view source, why is this happening in Rails 3? I'm m

    Re: [Rails] Re: Textmate vs. MacVim

    2010-09-09 Thread radhames brito
    OMG LOL On Thu, Sep 9, 2010 at 11:17 AM, Philip Hallstrom wrote: > > On Sep 9, 2010, at 4:21 AM, radhames brito wrote: > > > the problem with vim is that people always say is so powerful but when i > try to use it is like im looking at the sky waiting to see a UFO to pass by > but nothing happen

    Re: [Rails] acts_as_list query

    2010-09-09 Thread radhames brito
    i think you should allow position to be null and that every new entry should be new , im not sure On Thu, Sep 9, 2010 at 11:15 AM, Ben wrote: > When moving an item around within the list, shouldn't EVERY item have > its optimisitc locking field updated? Currently, only the item that is > moved h

    Re: [Rails] Re: Re: Re: Re: formtastic issue

    2010-09-09 Thread radhames brito
    oh, good On Thu, Sep 9, 2010 at 11:26 AM, Jamal Soueidan wrote: > radhames brito wrote: > > try this > > > > <% semantic_form_for polymorphic_path([:admin, @user]) do |form| %> > > <% form.inputs do %> > > <%= form.input :name %> > > <%= form.input :last_name %> > > <%end%> > > <% form.butt

    Re: [Rails] Syntax with link_to using block, remote, parameters and class/id

    2010-09-09 Thread radhames brito
    change :url to url_for On Thu, Sep 9, 2010 at 10:55 AM, William Hatch wrote: > Rails 3rc, Ruby 1.9.2 > > Newish to rails; very new to rails3 > > I'm trying to create a link using a block so I can wrap the name contents > in a span, for an ajax request using multiple parameters and finally, also

    [Rails] Re: Re: Re: Re: formtastic issue

    2010-09-09 Thread Jamal Soueidan
    radhames brito wrote: > try this > > <% semantic_form_for polymorphic_path([:admin, @user]) do |form| %> > <% form.inputs do %> > <%= form.input :name %> > <%= form.input :last_name %> > <%end%> > <% form.buttons do %> > <%=f.commit_button "OMG"% > <%end%> > <% end %> I just did [:admin,

    Re: [Rails] conditional ajax call after page is loaded

    2010-09-09 Thread radhames brito
    explain the first paragraph better please and the answer to the second question is yes On Thu, Sep 9, 2010 at 10:54 AM, dino d. wrote: > Hi - I have an app where the user can submit a query and the page gets > updated dynamically. Right now, the user types in a query with a > remote_form_tag.

    Re: [Rails] Re: Re: Re: formtastic issue

    2010-09-09 Thread radhames brito
    if nothing show after this then check if you are creating and instance of user in the user controller def new @user = User.new end On Thu, Sep 9, 2010 at 11:22 AM, radhames brito wrote: > You nested the route and the controller when you did this > Admin::UsersController so action="/admin/use

    Re: [Rails] Re: Re: Re: formtastic issue

    2010-09-09 Thread radhames brito
    You nested the route and the controller when you did this Admin::UsersController so action="/admin/users/new" is correct in fact your views should be in views/admin/user class Admin::UsersController < ApplicationController def new @user = User.new end end you are nesting On Thu, Sep 9,

    [Rails] Re: Will a Quad-core i5 processor significantly speed up development on Linux or Mac?

    2010-09-09 Thread Chris Winslett
    Right-o Jet. I didn't think anyone was trying to develop Ruby on Windows anymore :) Chris On Sep 9, 8:28 am, BlueHandTalking wrote: > Michael and Greg, thanks for the info. You have saved me some money! I > will go for lots of RAM, and not be concerned about the latest > processor. > > Chris, I

    Re: [Rails] Re: Re: Re: formtastic issue

    2010-09-09 Thread radhames brito
    try this <% semantic_form_for polymorphic_path([:admin, @user]) do |form| %> <% form.inputs do %> <%= form.input :name %> <%= form.input :last_name %> <%end%> <% form.buttons do %> <%=f.commit_button "OMG"% <%end%> <% end %> On Thu, Sep 9, 2010 at 10:49 AM, Jamal Soueidan wrote: > radha

    Re: [Rails] Re: Textmate vs. MacVim

    2010-09-09 Thread Philip Hallstrom
    On Sep 9, 2010, at 4:21 AM, radhames brito wrote: > the problem with vim is that people always say is so powerful but when i try > to use it is like im looking at the sky waiting to see a UFO to pass by but > nothing happens There is a steep learning curve... as this comparison chart clearly s

    [Rails] acts_as_list query

    2010-09-09 Thread Ben
    When moving an item around within the list, shouldn't EVERY item have its optimisitc locking field updated? Currently, only the item that is moved has its optimisitc locking field updated, but every item has its position field changed so surely they too should have their optimistic locking fields u

    Re: [Rails] How to apply OR condition in model.find?

    2010-09-09 Thread Fred Ballard
    Hi, http://apidock.com/rails/v2.3.8/ActiveRecord/Base/find/class shows: mihserf - July 22, 20083 thanks :conditions examples :conditions => {:login => login, :password => password} :conditions => [‘subject LIKE :foo OR body LIKE :foo’, {:foo => ‘woah’}] (from the book "The Rails Way") On

    [Rails] Syntax with link_to using block, remote, parameters and class/id

    2010-09-09 Thread William Hatch
    Rails 3rc, Ruby 1.9.2 Newish to rails; very new to rails3 I'm trying to create a link using a block so I can wrap the name contents in a span, for an ajax request using multiple parameters and finally, also specifying the class and id of the generated link element. Here's what I've got so far:

    [Rails] Re: Gruff Stacked Bar order of data

    2010-09-09 Thread One Rep
    Jorge Rodriguez wrote: > I am making a stacked bar graph in Gruff. Could anyone help me by > telling me how I can change the order in which the data is stacked. No > matter what order I put the data in, I get the same result on the png > picure. Any help would be much appreciated. > Thanks.

    Re: [Rails] Re: RMagick to_blob display via AJAX call

    2010-09-09 Thread Rob Biedenharn
    On Sep 9, 2010, at 7:34 AM, radhames brito wrote: right and also <%= image_tag url_for(:controller => "tabs", :action => "watch_text", :id => 0) %> the image tag should point to a path in the server and the image should be serve by the webserver not rails. As long as the URL will return

    [Rails] conditional ajax call after page is loaded

    2010-09-09 Thread dino d.
    Hi - I have an app where the user can submit a query and the page gets updated dynamically. Right now, the user types in a query with a remote_form_tag. I'd like to add the ability to encode the search term in the URL itself, so the query is shareable, in addition to being able to manually type i

    [Rails] Re: Re: Re: formtastic issue

    2010-09-09 Thread Jamal Soueidan
    radhames brito wrote: > did you put the = after <%? Yes. <% semantic_form_for polymorphic_path([:admin, @user]) do |form| %> <%= form.inputs %> <%= form.buttons %> <% end %> Another issue. http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Googl

    Re: [Rails] Re: Re: Populate combo box from database without repeatness

    2010-09-09 Thread PalaniKannan K
    HI, Its populated... Thank you verymuch... On 9 September 2010 16:39, Ar Chron wrote: > PalaniKannan K wrote: > > But, I am unable to use params[:id] to get the selected value > > from collection_select. how i can get selected value to params. > > > > I need the flow > > collection_select (valu

    [Rails] Re: Re: Populate combo box from database without repeatness

    2010-09-09 Thread Ar Chron
    PalaniKannan K wrote: > But, I am unable to use params[:id] to get the selected value > from collection_select. how i can get selected value to params. > > I need the flow > collection_select (value selected) -> param[:id]-> find SQL row.. > The selected value is in params already, just not whe

    Re: [Rails] Re: Polymorphic advice for this design

    2010-09-09 Thread radhames brito
    sorry i forgot you use scaffold , here is the thing ill make a guide for this , from the migration step by step to the view create a table like this create_table :sugestions do |t| t.string first_name t.string last_name t.string email t.string business_name t.string business_address t.stri

    [Rails] Re: Will a Quad-core i5 processor significantly speed up development on Linux or Mac?

    2010-09-09 Thread Yiannis
    Indeed, that's why you better go for a OS change :). I think that you don't need a very strong pc for rails development, just a pc with linux and you are ready for action! I believe 2gb can also do the work. If you are designing thinks and need something for design then ok buy a strong one, if you

    [Rails] Re: Re: Re: Re: Re: Why isn't the image showing up

    2010-09-09 Thread Abder-Rahman Ali
    radhames brito wrote: > great good luck Thanks @radhames :-) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscrib

    Re: [Rails] Capistrano Deploy with SVN over SSH - Network connection closed unexpectedly

    2010-09-09 Thread radhames brito
    Great!!! On Thu, Sep 9, 2010 at 9:46 AM, Gregor Panek wrote: > Thanks radhames you got it! Costs me half a day and was so easy to solve. > Copied *default_run_options[:pty] = true* into my deploy.rb and now he > accepts the ssh key and the deploy worked. > > Greetings Greg > > > Am 09.09.2010 um

    [Rails] Re: Polymorphic advice for this design

    2010-09-09 Thread Christian Fazzini
    Yes I know, I am just trying to understand how to implement this properly. It's easy enough to rollback the migration and remove the respective migration files. However, I need to know whether I need controllers, models and views for citysuggestion and businesssuggestion On Sep 9, 9:46 pm, Marnen

    Re: [Rails] Capistrano Deploy with SVN over SSH - Network connection closed unexpectedly

    2010-09-09 Thread Gregor Panek
    Thanks radhames you got it! Costs me half a day and was so easy to solve. Copied default_run_options[:pty] = true into my deploy.rb and now he accepts the ssh key and the deploy worked. Greetings Greg Am 09.09.2010 um 14:59 schrieb radhames brito: > aahh the old ssh to the same machine from

    [Rails] Re: Polymorphic advice for this design

    2010-09-09 Thread Marnen Laibow-Koser
    Christian Fazzini wrote: > I thought you said I needed to scaffold the citysuggestion and > businesssuggestion? Scaffold generates controllers, views, and models > (if they already dont exist)? > > If I do rake db:migrate, it generates the tables in the db. Should I > remove the migration files th

    [Rails] Re: Polymorphic advice for this design

    2010-09-09 Thread Christian Fazzini
    I thought you said I needed to scaffold the citysuggestion and businesssuggestion? Scaffold generates controllers, views, and models (if they already dont exist)? If I do rake db:migrate, it generates the tables in the db. Should I remove the migration files that the scaffold generator generates b

    [Rails] Re: Polymorphic advice for this design

    2010-09-09 Thread Christian Fazzini
    I thought you said I needed to scaffold the citysuggestion and businesssuggestion? Scaffold generates controllers, views, and models (if they already dont exist)? On Sep 9, 9:20 pm, radhames brito wrote: > errr, there was suppose to be only on table, and 3 model, one that really is > the table an

    Re: [Rails] How to apply OR condition in model.find?

    2010-09-09 Thread PalaniKannan K
    Dear Collin... Wooww... Excellent... Tanx @ extreme. I too tried with many examples obtained from online forums... This made me fun... On 9 September 2010 14:43, Colin Law wrote: > On 9 September 2010 12:32, PalaniKannan K wrote: > > Hi, > > > > @table_names = TableName.find(:all, :conditions=

    [Rails] Re: Will a Quad-core i5 processor significantly speed up development on Linux or Mac?

    2010-09-09 Thread BlueHandTalking
    Michael and Greg, thanks for the info. You have saved me some money! I will go for lots of RAM, and not be concerned about the latest processor. Chris, I couln't agree more on your comment that knowledge is the best investment. However, the speed you are working at does come into play. I was devel

    [Rails] Re: Re: Textmate vs. MacVim

    2010-09-09 Thread Marnen Laibow-Koser
    Fidel Viegas wrote: > On 9/9/10, Marnen Laibow-Koser wrote: >> radhames brito wrote: >>> i must be missing something because everyone seems to love vim but to me >>> is >>> just archaic. >> >> I agree with you. The modal interface should have died in the 1970s. >> If I want a console editor, I us

    Re: [Rails] Re: Polymorphic advice for this design

    2010-09-09 Thread radhames brito
    errr, there was suppose to be only on table, and 3 model, one that really is the table and the other that inherit from the base one, thats why it does not save to the citysuggestions table, its not suppose to exist, you are user the same table for both models because their only difference are 2 fie

    [Rails] Re: Hello

    2010-09-09 Thread Ar Chron
    There are probably a bazillion tutorials out on the web (well, maybe only a million). Google is your friend in this regard. The forum members can't really recommend anything specific because we don't know even what your OS is, and the specific install instructions differ according to the OS. A

    Re: [Rails] Re: Re: mysql2

    2010-09-09 Thread radhames brito
    any On Thu, Sep 9, 2010 at 9:09 AM, Manish Nautiyal wrote: > radhames brito wrote: > > at least its solved right? > > you are talking about window or linux ? > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on

    [Rails] Re: Re: mysql2

    2010-09-09 Thread Manish Nautiyal
    radhames brito wrote: > at least its solved right? you are talking about window or linux ? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@g

    [Rails] Re: Will a Quad-core i5 processor significantly speed up development on Linux or Mac?

    2010-09-09 Thread Ar Chron
    My own $0.02... Buy the best machine you can afford to today, or wait. There will always be a better deal in a month, it's the nature of the beast. And price vs performance is always a subjective matter. The i5 will have a longer useful lifetime, but I don't know how often you change your rig

    Re: [Rails] Re: mysql2

    2010-09-09 Thread radhames brito
    at least its solved right? On Thu, Sep 9, 2010 at 8:00 AM, wilson wrote: > I agree with you. I lost almost an hour looking for how to resolve > this problem. Just here I`ve found the solution. > > On 8 set, 23:22, ALISHER ULUGBEKOV wrote: > > I am really disappointed that rails 3.0 have a prob

      1   2   >