[Rails] Re: RESTful routing, in-place editing, and creating new resource obj - design question

2009-08-20 Thread lunaclaire
Thx, Aldric but, could you pt me to the specific page for the tutorial you mentioned? On Aug 20, 10:01 am, Aldric Giacomoni wrote: > I believe that in this tutorial lie the answers to some if not all of > your questions:http://www.buildingwebapps.com/learningrails > > I followed it a little

[Rails] Re: Refactoring into Model...need help

2009-08-20 Thread ÜberBaller
On Aug 20, 3:28 pm, Frederick Cheung wrote: > What is this code suppose to do ? The code above isn't actually doing > anything as far as I can tell - just comparing pairs of strings with > the =~ method (which as far as I can tell will just raise an exception > because it's expecting something m

[Rails] validation problem

2009-08-20 Thread Wap Addon
Hello Guys i want to use external validation i mean javascript validation but whenever click on create i mean (add new record submit)that time my first text box is black then it give me alert but when i click on 'ok' it redirect to controller and give error not focus on same text box. -- Posted v

[Rails] Re: has_many through but with one table?

2009-08-20 Thread Rob Biedenharn
On Aug 20, 2009, at 11:58 PM, frankjmat...@gmail.com wrote: > Maybe I'm looking at this the wrong way and with that - hopefully > someone can either suggest a simpler way or the right way. > > I have a Quote model - for all intents and purposes, just say it has > one attribute :price. > > I want t

[Rails] Re: find in model

2009-08-20 Thread karthik k
On Thu, Aug 20, 2009 at 7:57 PM, Jeffrey L. Taylor wrote: > > Quoting karthik k : > > On Thu, Aug 20, 2009 at 2:05 PM, Jeffrey L. Taylor >wrote: > [snip] > > > > Hi Jeffrey > > > > Thank you > > i will learn about named_scope > > > There is an excellent Railscast on named_scope. My Internet con

[Rails] Re: REGEX - PROBLEM

2009-08-20 Thread Jeffrey L. Taylor
Quoting Newb Newb : > > Helloo.. > how to make this below regular expression not to accept _ anywhere in > the string > /^[a-zA-Z0-9.]+[\w\s]*$/ > how can i modify it.. > Any Advices or Suggesions... > Thanks if s =~ /_/ reject string end --~--~-~--~~~---

[Rails] Re: Fields when entered needs to be validated

2009-08-20 Thread karthik k
On Thu, Aug 20, 2009 at 4:34 PM, Rails List < rails-mailing-l...@andreas-s.net> wrote: > > Karthik Kantharaj wrote: > > hi guys > > > > Thanks for the support you give > > > > I have some four fields which is not mandatory, but when that field is > > entered need to be validated before saved > > e

[Rails] Re: First App- Error 500

2009-08-20 Thread Rick
When your http://localhost:3000 comes up, what do you see if you follow the link "About_your_application's_environment"? I get: Ruby version1.8.7 (powerpc-darwin9.7.0) RubyGems version1.3.4 Rack version1.0 Rails version 2.3.3 Active Record version 2.3.3 Action Pack version

[Rails] Re: REGEX - PROBLEM

2009-08-20 Thread Samer Abukhait
The dot (after the 9) means any character; if you remove it, it's gonna only accept a-zA-Z0-9 --~--~-~--~~~---~--~~ 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 rubyonrai

[Rails] URL-Based Thumbnail Generation

2009-08-20 Thread Andrew Pace
I am currently have a 'products' table that has a ":has_many" relationship with a 'photos' table. I am uploading photos to accompany products. Right now, I upload the photo, save the metadata to the 'photos' table and the image to the filesystem. Then, I direct a url from within the products di

[Rails] Route Problem

2009-08-20 Thread Glen
So I'm trying to start up my first rails app in quite a while (since 1.5) and I'm getting the following error: /Library/Ruby/Gems/1.8/gems/actionpack-2.3.3/lib/action_controller/ routing/builder.rb:159:in `build': undefined method `[]' for :comments:Symbol (NoMethodError) Obviously it doesn't li

[Rails] Requesting a remote ip in plugin

2009-08-20 Thread mahesh
Im creating plugin for limiting the ip, i have included the plugin name in my controller Controller: class AdminController < ApplicationController acts_as_ratelimit def login session[:user_id] = nil if request.post? user = User.authenticate(params[:name

[Rails] has_many through but with one table?

2009-08-20 Thread frankjmat...@gmail.com
Maybe I'm looking at this the wrong way and with that - hopefully someone can either suggest a simpler way or the right way. I have a Quote model - for all intents and purposes, just say it has one attribute :price. I want to be able to add the following self-referential attributes (which I *thi

[Rails] REGEX - PROBLEM

2009-08-20 Thread Newb Newb
Helloo.. how to make this below regular expression not to accept _ anywhere in the string /^[a-zA-Z0-9.]+[\w\s]*$/ how can i modify it.. Any Advices or Suggesions... Thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Re: My first rails project completed

2009-08-20 Thread Greg Donald
On Thu, Aug 20, 2009 at 10:02 PM, Alpha Blue wrote: > I'd have to > change the same routing in my routes file, making it more static than > dynamic. Is it really that difficult to experiment and see? /me gives up Have a nice site. :) -- Greg Donald http://destiney.com/ --~--~-~--~-

[Rails] Re: My first rails project completed

2009-08-20 Thread Alpha Blue
Thanks for the feedback Greg, I'll look into cleaning up the URLs. -- 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

[Rails] Re: My first rails project completed

2009-08-20 Thread Alpha Blue
Greg, that's really neat mate. Learned something new and didn't realize you could do that with dynamic content through routes. My worry was that if I decide to change the routing in page management, I'd have to change the same routing in my routes file, making it more static than dynamic.

[Rails] HELP - AUTO COMPLETE

2009-08-20 Thread Newb Newb
hi i am using rails auto complete plugin. I'm autocompleting over UserInfo Firstname as so auto_complete_for :user_info, :first_name, :limit => 30 everything works fine. but I want to filter out the first name given by auto_completer to those which has conditions :conditions => ["login !=?",'admi

[Rails] Routing Error with Rails 2.3.3

2009-08-20 Thread CCH
Hi All This piece of code works in Rails 1.2 But crashes in Rails 2.2.3 Processing ApplicationController#index (for 127.0.0.1 at 2009-08-21 10:22:23) [GET] ActionController::RoutingError (No route matches "/images/crm.jpg" with {:method=>:get}): -e:2:in `load' -e:2 Rendering rescues/layo

[Rails] Re: My first rails project completed

2009-08-20 Thread Greg Donald
On Thu, Aug 20, 2009 at 8:20 PM, Alpha Blue wrote: > > Hi Greg, > > It was designed that way.  I created a page management system so that > many of the pages are dynamically driven, not statically driven with > routes.  Routing is fine with hard controllers but some of my pages have > no controlle

[Rails] Re: My first rails project completed

2009-08-20 Thread Alpha Blue
Marnen Laibow-Koser wrote: > Hey, great post! (Although, as you know, your app will probably never > be "completed" -- you'll always be thinking of further improvements.). > I'm very impressed with how fast you learned all this stuff, and I'll > have to check out your site. I'm so glad your e

[Rails] Re: My first rails project completed

2009-08-20 Thread Alpha Blue
Hi Greg, It was designed that way. I created a page management system so that many of the pages are dynamically driven, not statically driven with routes. Routing is fine with hard controllers but some of my pages have no controllers and are stored directly in the database. -- Posted via ht

[Rails] Re: My first rails project completed

2009-08-20 Thread Marnen Laibow-Koser
Alpha Blue wrote: > Hi all, > > First, this is a longer than normal read but I hope that you get through > it all and can learn from my experiences. > > So, I wanted to talk about my experiences with my first rails project > now that I've completed it for the beginning of the football season. [.

[Rails] Re: My first rails project completed

2009-08-20 Thread Greg Donald
On Thu, Aug 20, 2009 at 7:43 PM, Alpha Blue wrote: > > http://ncaastatpages.com http://ncaastatpages.com/tsrs_ratings?name=tsrs You need to add a custom route to get rid of those question marks in the urls. Something like this should work: map.connect 'tsrs-ratings/:name', :controller => 'ts

[Rails] My first rails project completed

2009-08-20 Thread Alpha Blue
Hi all, First, this is a longer than normal read but I hope that you get through it all and can learn from my experiences. So, I wanted to talk about my experiences with my first rails project now that I've completed it for the beginning of the football season. First, here's the link: http://nc

[Rails] Re: custom associations

2009-08-20 Thread nick ger
Also I don't want to add oldrma_id and work_order_id to tables - cause then I have an extra variable to keep track off. And has_many_and_belong_to wouldn't work, cause again I ref_number is not a primary key on either table and it's their for history reasons. -- Posted via http://www.ruby-foru

[Rails] Re: bad git pull

2009-08-20 Thread Milan Dobrota
Thank you guys. git merge tool is awesome!!! :) -- 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

[Rails] Re: custom associations

2009-08-20 Thread nick ger
Also the reason your previous suggestion wouldn't work, cause when you specify foreign_key, rails assumes, that it's a primary key in the table you are referencing. Which it is not. ref_number field is just a varchar field , that while unique is not a primary key in the OldRma model, and can't

[Rails] Re: Restful_authentication as a web service?

2009-08-20 Thread Martin Dinstuhl
Larry, Thank you SO much for answering my question. If anyone is wondering, THIS WORKED. Have a good one! Martin Dinstuhl On Wed, Aug 19, 2009 at 3:00 AM, hitch wrote: > > The format is determined by the HTTP Accept header, and not by adding > an extension on the URL. > So, your url remains

[Rails] Re: custom associations

2009-08-20 Thread nick ger
Fred, Perhaps a diagram would explain it better: http://www.gorbikoff.com/stuff/rails.png the relationship I'm trying to recreate is in red. You can see that I can't change the primary keys as they are already used in other models. So I need to create a custom association here. Nick -- Poste

[Rails] Re: custom associations

2009-08-20 Thread Frederick Cheung
On Aug 21, 12:27 am, nick ger wrote: > Frederick Cheung wrote: > > On Aug 21, 12:16 am, nick ger > > wrote: > > >> This obviously breaks cause there is no direct association between two > >> models. > >> belongs_to with a foreign_key - won't work cause I can't change the > >> primary keys on m

[Rails] Re: custom associations

2009-08-20 Thread nick ger
Frederick Cheung wrote: > On Aug 21, 12:16�am, nick ger > wrote: >> >> This obviously breaks cause there is no direct association between two >> models. >> �belongs_to with a foreign_key - won't work cause I can't change the >> primary keys on models. Rails doesn't support secondary keys. So can

[Rails] Re: custom associations

2009-08-20 Thread nick ger
Also to clarify why I need this. I could run a second statement in controller where I find the OldRma, but it's slower then running an include, and OldRma - has other associations that need to be used, so an include would give me an option to have everything in one variable - which makes it ea

[Rails] Re: custom associations

2009-08-20 Thread Frederick Cheung
On Aug 21, 12:16 am, nick ger wrote: > > This obviously breaks cause there is no direct association between two > models. >  belongs_to with a foreign_key - won't work cause I can't change the > primary keys on models. Rails doesn't support secondary keys. So can > somebody suggest a way to do it

[Rails] Re: Extract data from SOAP response

2009-08-20 Thread Ridhdhi Patel
hi all, can you help me how i can use soap response as xml file in Rexml. for example: response = obj.createUser(createUsers) response is my final result which i am getting by running script. so if i use xml_tree =REXML::Document.new(response.raw_xml) that time it gives me error. so any

[Rails] Re: Extract data from SOAP response

2009-08-20 Thread Ridhdhi Patel
hi all, can you help me how i can use soap response as xml file in Rexml. for example: response = obj.createUser(createUsers) response is my final result which i am getting by running script. so if i use xml_tree =REXML::Document.new(response.raw_xml) that time it gives me error. so an

[Rails] custom associations

2009-08-20 Thread nick ger
Hi, I was wondering if somebody has any pointer for me. Here is what I have and trying to do. Let's say I have 2 models WorkOrder ( id, ref_number, desc) ( and a bunch of other fields) OldRma ( id, ref_number, customer_data) Work order is a big table that has all the info about the work ord

[Rails] Re: XML tags being converted to lowercase

2009-08-20 Thread David Richardson
Problem solved - it's the Safari DOM inspector that's doing it. --~--~-~--~~~---~--~~ 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-talk@googlegroups.com To un

[Rails] Re: integrate *own* ruby on rails chat application, is there a gem for that?

2009-08-20 Thread Marnen Laibow-Koser
On Aug 20, 2:24 am, JGoodrich wrote: > So, I abhor using 3rd party API's personally, as it creates extra > dependencies *and* extra possible points of failure for our business. Whereas rolling your own takes much more development time and -- often -- doesn't work as well. There's certainly a tr

[Rails] XML tags being converted to lowercase

2009-08-20 Thread David Richardson
I have the following method to deliver an xml response: def xslt_layout @ticket = Ticket.find_by_id(params[:id]) render :text => "#...@ticket.xml}", :layout => false, :filename => "# {...@ticket.ticket_number}.xml", :content_type => "application/xml" end The xml is generated using Bu

[Rails] Re: Refactoring into Model...need help

2009-08-20 Thread Frederick Cheung
On Aug 20, 9:28 pm, ÜberBaller wrote: > class Oligo < ActiveRecord::Base >         def self.search(freezer, cane, box, boxname, slot, oligoname, > sequence, page, sidx, sord, rows, _search) >                 find(:all) do >             if _search == "true" >               freezer   =~ "%#{freeze

[Rails] Re: bulk email solutions

2009-08-20 Thread Philip Hallstrom
On Aug 20, 2009, at 2:46 PM, James Englert wrote: > I've googled a bit and I can't seem to find it. Could you do me a > huge > favor and link me?! find_each is what it's called... http://github.com/rails/rails/blob/106976df0911e423042ec4abc165fd561766a047/activerecord/lib/active_record/batc

[Rails] Refactoring into Model...need help

2009-08-20 Thread ÜberBaller
I posted this on the 2dcjqgrid group but maybe I'm better off here. http://groups.google.com/group/2dcjqgrid/browse_thread/thread/ad4115ed1bca2050 I'm fairly new to rails and am having a bit of trouble moving my jqgrid code from the controller to the model. It worked fine in the controller. I

[Rails] Re: bulk email solutions

2009-08-20 Thread James Englert
I've googled a bit and I can't seem to find it. Could you do me a huge favor and link me?! On Thu, Aug 20, 2009 at 5:34 PM, Philip Hallstrom wrote: > > >> Hard to say without knowing how many customers that query is going to > >> return... if it's under a 100 it doesn't matter. Under a 1000 it

[Rails] Simple RJS question--toggling the text of a link_to_function link

2009-08-20 Thread Roy Pardee
Hey All, I'm dabbling in a little DHTML to show/hide a fieldset on a page, w/ the following: <%= link_to_function("Show People", nil, :id => "more_link") do |page| page.visual_effect(:toggle_appear, "organization-people") page.replace_html("more_link", "Hide People") end %

[Rails] Re: rails messaging system

2009-08-20 Thread Matt Jones
I've used the restful_ezm plugin, which generates a fairly basic messaging system. You'll still need to do some customization, but it's a decent place to start. My version (updated to behave with Rails 2.3) is on Github at http://github.com/al2o3cr/restful_ezm/tree --Matt Jones On Aug 20, 1:55 

[Rails] Re: bulk email solutions

2009-08-20 Thread Philip Hallstrom
>> Hard to say without knowing how many customers that query is going to >> return... if it's under a 100 it doesn't matter. Under a 1000 it >> probably doesn't matter. > > i have under 500 customers If it were me I'd email them each individually and customize the email to include their full n

[Rails] Re: bulk email solutions

2009-08-20 Thread Aldo Italo
> Hard to say without knowing how many customers that query is going to > return... if it's under a 100 it doesn't matter. Under a 1000 it > probably doesn't matter. i have under 500 customers > of memory... at least use the new find/block stuff. what is it? thanks -- Posted via http://ww

[Rails] update method is not working

2009-08-20 Thread raj vuppala
error : ActionController::MethodNotAllowed Only get, put, and delete requests are allowed. --~--~-~--~~~---~--~~ 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 rubyonrail

[Rails] Re: what should be server-side and what should be client-side

2009-08-20 Thread Marnen Laibow-Koser
drewB wrote: > I have been thinking lately about what should be executed client-side > vs. server-side and was curious what others thoughts are. [...] There are of course no fixed rules, and a lot depends on usage profile, so take my comments with that in mind. > *Server-side heavy solution* >

[Rails] Re: bulk email solutions

2009-08-20 Thread Philip Hallstrom
On Aug 20, 2009, at 1:51 PM, Aldo Italo wrote: > > i need to send massive emails to various customers, > here 2 solutions i have think: > > > 1- > > customers = Customer.find(:all, :conditions => "newsletter = 1") > customers.each do |c| > @email = c.email > Mailer.deliver_send_newsletter(@sub

[Rails] bulk email solutions

2009-08-20 Thread Aldo Italo
i need to send massive emails to various customers, here 2 solutions i have think: 1- customers = Customer.find(:all, :conditions => "newsletter = 1") customers.each do |c| @email = c.email Mailer.deliver_send_newsletter(@subject, @email, @notice_id) end 2- customers = Customer.find(:all,

[Rails] Re: Puts just work on Controllers

2009-08-20 Thread John-Paul Harold
Damaris Fuentes wrote: > Taking a look through Google I found that some people have the same > problem, but most of them because they have changed from Webrick to > Mongrel. Apparently, console with mongrel does not show the "puts" > messages. However, I am working with webrick. I'm getting th

[Rails] Re: HELP -- I'm missing something

2009-08-20 Thread lardawge
Well since Event.all should have returned an array and not thrown an error, my guess is there is a problem with your model/database. Go into the terminal and open up a session using script/console, at the prompt enter Event.all and see what it returns... On Aug 20, 1:51 pm, spokra wrote: > in ap

[Rails] [JOBS] Platform for hyperlocal content

2009-08-20 Thread AdamPHX
Funded media startup in Phoenix, Arizona, seeks a talented team of developers to build a platform for hyperlocal content in urban environments. Our project won an international contest for new media and first-round funding from a major journalism foundation. We have lots of attention, passion and

[Rails] Re: HELP -- I'm missing something

2009-08-20 Thread spokra
I;ve tried both ways of selecting the data.. and the log shows select * from events.. and doing the find in the console works fine. On Aug 20, 10:57 am, James Englert wrote: > It would guess that Event.all returned nil.  Did you mean to say > Event.find(:all)  ? > > On Thu, Aug 20, 2009 at 1:5

[Rails] Re: HELP -- I'm missing something

2009-08-20 Thread Colin Law
2009/8/20 spokra : > > in application controller > > @upcomingevents = Event.all > > in application layout > > <% @upcomingevents.each do |upcomingevent| %> > <%= upcomingevent.name %> > <% end %> > > > there are events.. but i get an error of > > > ActionView::TemplateError (undefined method `eac

[Rails] Re: Display variable as method in an activerecord call?

2009-08-20 Thread Rob Biedenharn
On Aug 20, 2009, at 3:08 PM, Alpha Blue wrote: > Example: > > def somemethod(variable) > value = Record.find(:all) > value.each do |row| >row.colone = "foo" >row.coltwo = "bar" >row.__send__(variable) = "keke" >row.save! > end > end > > somemethod(colthree) > > => unexpected '='

[Rails] Re: Display variable as method in an activerecord call?

2009-08-20 Thread Alpha Blue
I figured it out myself. def somemethod(variable) value = Record.find(:all) value.each do |row| row.colone = "foo" row.coltwo = "bar" row[variable.to_sym] = "keke" row.save! end end Making the variable into a symbol works. -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Re: Juggernaut question

2009-08-20 Thread Wojciech Piekutowski
Hi, On Aug 20, 4:53 pm, Mark Mr wrote: > 1) Do I need to talk to my webhost about opening a specific port? right > now it's set as the default: 5001. Can you `telnet your_host 5001`? If not - probably this port is blocked and you need to ask your hosting provider for help. > > 2) How do you kee

[Rails] Display variable as method in an activerecord call?

2009-08-20 Thread Alpha Blue
Example: def somemethod(variable) value = Record.find(:all) value.each do |row| row.colone = "foo" row.coltwo = "bar" row.__send__(variable) = "keke" row.save! end end somemethod(colthree) => unexpected '=', expecting kEND I can't do row.variable, that will create an unde

[Rails] Re: HELP -- I'm missing something

2009-08-20 Thread Marnen Laibow-Koser
James Englert wrote: > It would guess that Event.all returned nil. Did you mean to say > Event.find(:all) ? In recent versions of Rails, those two are equivalent. (Of course, we don't know what version the OP is using...) Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -

[Rails] Re: HELP -- I'm missing something

2009-08-20 Thread spokra
Drrr make a function.. and call it with a before filter.. On Aug 20, 11:04 am, spokra wrote: > I;ve tried both ways of selecting the data.. and the log shows select > * from events..   and doing the find in the console works fine. > > On Aug 20, 10:57 am, James Englert wrote: > > > It would

[Rails] Re: Passenger and 403s

2009-08-20 Thread elliottg
Any insight on this guys? On Aug 20, 12:33 pm, elliottg wrote: > I am setting up Passenger on my dev box and I am running into an issue > getting the ServerName on a vHost to work. The code below allows > localhost to work as planned. However when I try to pull up the app > using the ServerName

[Rails] Re: subdomainfu

2009-08-20 Thread James Englert
Hypothetically, I believe you could configure a local DNS server to redirect *.localhost to your ruby server. I'm not positive though. On Thu, Aug 13, 2009 at 9:11 AM, prabesh shrestha wrote: > > Hi all, > I am using subdomainfu plugin for subdomain in my project.I can get > the subdomain in th

[Rails] Re: HELP -- I'm missing something

2009-08-20 Thread James Englert
It would guess that Event.all returned nil. Did you mean to say Event.find(:all) ? On Thu, Aug 20, 2009 at 1:51 PM, spokra wrote: > > in application controller > > @upcomingevents = Event.all > > in application layout > > <% @upcomingevents.each do |upcomingevent| %> > <%= upcomingevent.name %

[Rails] HELP -- I'm missing something

2009-08-20 Thread spokra
in application controller @upcomingevents = Event.all in application layout <% @upcomingevents.each do |upcomingevent| %> <%= upcomingevent.name %> <% end %> there are events.. but i get an error of ActionView::TemplateError (undefined method `each' for nil:NilClass) on line #77 of app/view

[Rails] Re: Authlogic Administration

2009-08-20 Thread Fifigyuri
Hi, I just set up acl9. It is very simple to set up, the syntax is simple and nice. It depends how complex authorisation you want to use. I found Acl9 to be refered as authorisation for simple cases... but as I found it is possible to cover quite nice set of needs. bw, Gyuri On Aug 18, 7:02 pm,

[Rails] params becoming mangled after failed form validation and resubmit...

2009-08-20 Thread Erik Cameron
Dear all, I'm having a weird problem with a fairly straightforward form. (Please---if this is an RTFM issue, just let me know. I've been looking for answers to no avail, but it's certainly possible I missed something.) So: The software is designed to accept grant applications from libraries, re

[Rails] Re: RESTful routing, in-place editing, and creating new resource obj - design question

2009-08-20 Thread Aldric Giacomoni
I believe that in this tutorial lie the answers to some if not all of your questions: http://www.buildingwebapps.com/learningrails I followed it a little while back and it clicked a lot of things about Rails for me, and it does talk about in-place editing among others. Check it out, it may jus

[Rails] Re: find in model

2009-08-20 Thread Jeffrey L. Taylor
Quoting karthik k : > On Thu, Aug 20, 2009 at 2:05 PM, Jeffrey L. Taylor > wrote: [snip] > > Hi Jeffrey > > Thank you > i will learn about named_scope > There is an excellent Railscast on named_scope. My Internet connection won't stay up long enough to check, but I think the URL is www.rails

[Rails] Re: ** Removing all instances of mysql on mac osx **

2009-08-20 Thread Robert Walker
Mukund wrote: > On OS-X, you do need to install mysql gem with > > sudo gem install mysql -- --with-mysql-config = /usr/local/mysql/bin/ > mysql_config >From the header of database.yml # Install the MySQL driver: # gem install mysql # On Mac OS X: # sudo gem install mysql -- --with-mysql-di

[Rails] Re: ** Removing all instances of mysql on mac osx **

2009-08-20 Thread Aldric Giacomoni
If I may suggest this following post from an ignote (whistles innocently) user.. http://trevoke.net/blog/2009/04/17/installing-the-mysql-gem-on-osx/ Let me know if this works or not :) -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received

[Rails] habtm and accepts_nested_attributes_for

2009-08-20 Thread dwhsix
Do habtm and accepts_nested_attributes play well together? Some things I read imply yes, some no... and they don't *seem* to, based on what I've been trying. Thx, dwh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Can :conditions use an array and a dictionary together?

2009-08-20 Thread CoolAJ86
> In general that is about it. In this particular case it looks like you > could do > > current_contact.group.contacts.find :all, :conditions => [["jobs.name > LIKE ?", 'Teacher%'], ... As I understand it, that won't eager-load (join) groups, jobs, and contacts together. See, as I iterate throug

[Rails] Re: Can :conditions use an array and a dictionary together?

2009-08-20 Thread Jeffrey L. Taylor
Quoting Sijo Kg : > > Jeffrey L. Taylor wrote: > > Quoting CoolAJ86 : > >> [:jobs, :photos]) > > :conditions => > > "jobs.name LIKE 'Teacher%' AND group_id = #{current_contact.group}" > > > > HTH, > > Jeffrey > > Passing a string to :conditions like this welcomes sql injection attacks >

[Rails] Passenger and 403s

2009-08-20 Thread elliottg
I am setting up Passenger on my dev box and I am running into an issue getting the ServerName on a vHost to work. The code below allows localhost to work as planned. However when I try to pull up the app using the ServerName "livewiredmusic.local" I always get a 403. Also, I installed the Passeng

[Rails] Re: find in model

2009-08-20 Thread Jeffrey L. Taylor
Quoting karthik k : [snip] > Thank you > i will learn about named_scope > URL of Railscast is http://railscasts.com/. Episode 108. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

[Rails] Re: Redirect after login

2009-08-20 Thread Dan Sinclair
BUMP BUMP BUMP -- 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-talk@googlegroups.com To unsub

[Rails] what should be server-side and what should be client-side

2009-08-20 Thread drewB
I have been thinking lately about what should be executed client-side vs. server-side and was curious what others thoughts are. Let's take the following example. A user has selected X pieces of furniture. On a single page, they are shown a list of the furniture items with specific info about ea

[Rails] Juggernaut question

2009-08-20 Thread Mark Mr
Hi all, I've recently downloaded the juggernaut plugin and I was wondering if I could get some advice from anyone who's used this on a real site. I have it working just fine on my local version, but on my live server it doesn't seem to be working. It sends the information to the server just fine,

[Rails] Re: Master/Slave database setup with Rails?

2009-08-20 Thread Maurício Linhares
My woes were a little bit like yours, Masochism broke badly with the then current rails (2.2) and I had to find a solution. None were available so I just took the simplest solution (that should have been the only solution...) that was a "fake" db adapter that handled the calls to a master/slave co

[Rails] Re: Select tags

2009-08-20 Thread Frederick Cheung
On Aug 20, 1:04 pm, Hemant Bhargava wrote: > Thanks for reply .. > already read .. > And you didn't notice that the second parameter to options_for_select is the value to be selected ? (you do need to ensure that the type of the selected value is the same as the type of the select options - a c

[Rails] Re: Quick json question..

2009-08-20 Thread Robert Walker
Tim W. wrote: > That is why I mentioned it was a hack.. > > I take it there is no way to do it via the to_json method which is the > view at this point? Given that JSON offers no data type for storing date and time information, a choice must be made. Rails core team, I believe smartly, decided

[Rails] Re: Master/Slave database setup with Rails?

2009-08-20 Thread Yanni Mac
Linhares wrote: > http://github.com/mauricio/master_slave_adapter/tree/master > > - > Maur�cio Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr > > > > On Wed, Aug 19, 2009 at 4:05 PM, Yanni Maurício, Thanks for creating this plugin.. you saved me a ton of time!

[Rails] How write the excel with formula

2009-08-20 Thread Jayarajmohan Jaganathan
Hi all, I can write a excel file in normal, Now i need to write the excel with formula inside the column. Is it possible ? Please update me... Thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message b

[Rails] Re: sync list of files in DB vs. list of files in folder

2009-08-20 Thread Aldric Giacomoni
Marnen Laibow-Koser wrote: > Question: why do you need to duplicate the filesystem's directory > information in the DB? The filesystem's directory information has medical reports in Word document format. The naming convention is: "last name, first name{, middle initial, title}, date of study,

[Rails] Re: In IE there is delay in loading png images

2009-08-20 Thread Shanmu Gam
jhaagmans wrote: > Are you very sure none of your stylesheets are requesting png.htc > somehow? png.htc is a known fix for PNG in IE. If your stylesheet is > linking to it, but it doesn't exist, that might slow down your > request. Hi all, Thanks for your response. I am sure none of my styleshee

[Rails] Re: Select tags

2009-08-20 Thread Hemant Bhargava
Thanks for reply .. already read .. Is dere any type of mishappening is happening .. I mean if i am storing values in array as string .. >> Is dere any way to give default value or value to select tags .. >> My scenario is:- >> >> <% value_array = [1, 2, 3, 4, 5] %> >> >> � <%= options_for_se

[Rails] Re: Best InPace editing plugin / method

2009-08-20 Thread James West
Michael Moulsdale wrote: > I'm wanting to add some InPlace editing code to my application and > have seen a number of methods to do this. > > I therefore wanted to get a gauge on what this group thinks is the > best approach for the latest version of ruby and rails? > > Michael You need to elab

[Rails] Re: Select tags

2009-08-20 Thread Frederick Cheung
On Aug 20, 12:18 pm, Hemant Bhargava wrote: > Hello, > > Is dere any way to give default value or value to select tags .. > My scenario is:- > > <% value_array = [1, 2, 3, 4, 5] %> > >   <%= options_for_select (value_array) %> > > Read the docs for options_for_select Fred > Now i am storing

[Rails] Re: Fields when entered needs to be validated

2009-08-20 Thread Rails List
Karthik Kantharaj wrote: > hi guys > > Thanks for the support you give > > I have some four fields which is not mandatory, but when that field is > entered need to be validated before saved > else > it can take null value > can you please guide me > -- > Karthik.k > Mobile - +91-9894991640 Ass

[Rails] Re: How to freeze v 2.3.2?

2009-08-20 Thread James West
Conrad Taylor wrote: > On Thu, Aug 20, 2009 at 3:24 AM, James West < > rails-mailing-l...@andreas-s.net> wrote: > >> >> I don't understand why the freeze:edge is failing. > > > What platform are you on and what you're typing at the command prompt? > Also, > what are the exact error message(s)

[Rails] Select tags

2009-08-20 Thread Hemant Bhargava
Hello, Is dere any way to give default value or value to select tags .. My scenario is:- <% value_array = [1, 2, 3, 4, 5] %> <%= options_for_select (value_array) %> Now i am storing these values in database.. But after storing value i do not know how to show those values in my DDL(Drop down

[Rails] Re: In IE there is delay in loading png images

2009-08-20 Thread jhaagmans
Are you very sure none of your stylesheets are requesting png.htc somehow? png.htc is a known fix for PNG in IE. If your stylesheet is linking to it, but it doesn't exist, that might slow down your request. On 20 aug, 11:16, Shanmu Gam wrote: > Hi all, > > Can some one help me in this issue. My

[Rails] Re: How to freeze v 2.3.2?

2009-08-20 Thread Conrad Taylor
On Thu, Aug 20, 2009 at 3:24 AM, James West < rails-mailing-l...@andreas-s.net> wrote: > > Wap Addon wrote: > > follow this site instruction and do that way > > > > > http://arjunghosh.wordpress.com/2008/04/18/how-to-freeze-rails-application/ > > Thanks for the reply. > I think I'm missing somethi

[Rails] Re: In IE there is delay in loading png images

2009-08-20 Thread Borja Martín
maybe you have a javascript or stylesheet that is calling the htc file(proably to fix the transparency issue on ie6) regards On Thu, Aug 20, 2009 at 11:16 AM, Shanmu Gam < rails-mailing-l...@andreas-s.net> wrote: > > Hi all, > > Can some one help me in this issue. My application consists only pn

[Rails] Re: Can :conditions use an array and a dictionary together?

2009-08-20 Thread Sijo Kg
Jeffrey L. Taylor wrote: > Quoting CoolAJ86 : >> [:jobs, :photos]) > :conditions => > "jobs.name LIKE 'Teacher%' AND group_id = #{current_contact.group}" > > HTH, > Jeffrey Passing a string to :conditions like this welcomes sql injection attacks So can it be avoided and pass an array inst

[Rails] Re: How to freeze v 2.3.2?

2009-08-20 Thread James West
Wap Addon wrote: > follow this site instruction and do that way > > http://arjunghosh.wordpress.com/2008/04/18/how-to-freeze-rails-application/ Thanks for the reply. I think I'm missing something. I can't see how that is telling me to do anything different to the way's I'm trying. I don't unde

[Rails] Re: Descending into associations

2009-08-20 Thread jhaagmans
Marnen. you're fantastic :) I'm switching back to acts_as_nested_set now (getting quite fast at this switching business ;) ) and I hope I got it right this time. My model: class ProductAttribute < ActiveRecord::Base belongs_to :product acts_as_nested_set :scope => :product_id end Did I get

  1   2   >