[Rails] Auto print???

2009-10-05 Thread Saurabh Peshkar
Hi All, I'm working on online food ordering system, as the order is created an email is sent to the restaurant regarding the order, Is there any way to inform the restaurant using auto printout or a fax. Thanks in advance, Saurabh -- Posted via http://www.ruby-forum.com/.

[Rails] Re: creating 2 things at the same time?

2009-10-05 Thread Sijo Kg
Hi Mike Chai What I understood is you have relations like comment has_one picture picture belongs_to comment As an example comment name:string picture name:string,comment_id:integer So do as below in comments_controller new action @comment = Comment.new @comment.picture = Picture.new

[Rails] Re: creating 2 things at the same time?

2009-10-05 Thread Sijo Kg
And assuming you are on rails 2.3 -- 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

[Rails] Unable to install plugins from github

2009-10-05 Thread C K Kashyap
Hi All, My operating system is FC11...I tried to install will_paginate from github directly like this - script/plugin install git://github.com/mislav/will_paginate.git But I get an error saying [ckkash...@kingcobra test_plugin]$ script/plugin install git://github.com/mislav/will_paginate.git

[Rails] Retriving sessions value

2009-10-05 Thread Smit Shah
Hi All, I have created sub-domain in my application. Now, I want to use session variable, that is set in my main application, in my sub-domaine application. Is any one can help me out? Thanks... -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Re: Problem using ActiveRecord find with :joins and :select

2009-10-05 Thread Frederick Cheung
On Oct 5, 12:19 am, PierreW wamre...@googlemail.com wrote: Hi guys, When I do: temp = User.find(:all,                  :joins = INNER JOIN contents ON users.agent_id = contents.id,                  :select = contents.id, users.id, users.u_date) temp.first.inspect It seems to work

[Rails] Re: rescue

2009-10-05 Thread Frederick Cheung
On Oct 5, 4:52 am, Craig White craigwh...@azapple.com wrote: On Sun, 2009-10-04 at 14:07 -0700, Craig White wrote: On Sun, 2009-10-04 at 12:50 -0700, Craig White wrote: something changed in Rails 2.3.2 and @params and @env are good but @session seems to be nil - even when there is

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread Leonardo Mateo
On Mon, Oct 5, 2009 at 9:05 AM, C K Kashyap ckkash...@gmail.com wrote: Hi All, My operating system is FC11...I tried to install will_paginate from github directly like this - script/plugin install git://github.com/mislav/will_paginate.git But I get an error saying [ckkash...@kingcobra

[Rails] Multiple views of the same model

2009-10-05 Thread Jonas Latza
Hi, How can I implement two different views on the same model? My model has 30 attributes. The First view should display 1-12 and the second view the rest of them. In my case I am dealing with two medical anamneses with different topics. My idea was to generate a model called anamnesis

[Rails] WAV to ACC or MP3

2009-10-05 Thread Sergio Angeletti - Gmail
I have de audio files on the DB, is there a plugin ho transcode on the fly the audio file http://github.com/zencoder/rvideo/ is the solution? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Multiple views of the same model

2009-10-05 Thread Colin Law
2009/10/5 Jonas Latza to.the.mat...@gmail.com: Hi, How can I implement two different views on the same model? My model has 30 attributes. The First view should display 1-12 and the second view the rest of them. In my case I am dealing with two medical anamneses with different topics. My

[Rails] Re: Problems installing ruby gems on linux

2009-10-05 Thread Leonardo Mateo
On Sun, Oct 4, 2009 at 11:26 PM, mpcengineer mpclark...@aspire-design.com wrote: Hi, I am really finding this frustrating. i am trying to install ruby gems to allow me to try out rails. I have tried it on two linux systems. I can install ruby no problem. but when I run ruby setup.rb I get

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread C K Kashyap
Did you read the install documentation on github? It gives complete different install instructions than the one you're using. http://wiki.github.com/mislav/will_paginate/installation Yes I did, and that's how I managed to install will_paginate - however, I am stuck when it comes to other

[Rails] Re: mysql + Snow Leopard + Rails

2009-10-05 Thread Andi Schacke
Most probably your symbol in the password led to invalid yaml code (without the quotes) just dropping half of the password... Andi On Oct 4, 10:05 pm, tspore tsp...@gmail.com wrote: Correct, I can connect to mysql with no issues, either via terminal, or using any php app to connect to my

[Rails] Re: Atom Feed

2009-10-05 Thread Leonardo Mateo
On Sun, Oct 4, 2009 at 9:02 PM, doug ddjol...@gmail.com wrote: I am trying to create an atom feed by following closely (but not exactly) the example provided in DHH blog screencast.  I am getting the error: No route matches /blog/atom_feed.atom with {:method=:get} Did you define the new

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread Leonardo Mateo
On Mon, Oct 5, 2009 at 10:25 AM, C K Kashyap ckkash...@gmail.com wrote: Did you read the install documentation on github? It gives complete different install instructions than the one you're using. http://wiki.github.com/mislav/will_paginate/installation Yes I did, and that's how I managed

[Rails] Re: My App doesn't send mails

2009-10-05 Thread Andi Schacke
If you're still wondering why mails get sent in development mode: You probably have sendmail installed on your development machine, it just works out of the box. If you don't want to send mails in development mode, just set 'perform_deliveries = false' in your action_mailer configuration for your

[Rails] Re: Multiple views of the same model

2009-10-05 Thread Andi Schacke
Have a look at Florian Hanke's Representer plugin: http://github.com/floere/representer It allows you to have 'object oriented' views, maybe it suits your needs... Andi On Oct 5, 10:19 am, Colin Law clan...@googlemail.com wrote: 2009/10/5 Jonas Latza to.the.mat...@gmail.com: Hi, How

[Rails] Re: Multiple views of the same model

2009-10-05 Thread Jonas Latza
Thanks for the suggestions. I will try it. Am 05.10.2009 um 10:46 schrieb Andi Schacke: Have a look at Florian Hanke's Representer plugin: http://github.com/floere/representer It allows you to have 'object oriented' views, maybe it suits your needs... Andi On Oct 5, 10:19 am, Colin

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread C K Kashyap
Yes, The docs for that gem. Either you mispelled the name or that gem doesn't exist. Check the docs, if the docs doesn't work or doesn't exists, then provide more information about the gem here and maybe somebody can help you. This is the git repository that I am trying to install -

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread Leonardo Mateo
On Mon, Oct 5, 2009 at 11:05 AM, C K Kashyap ckkash...@gmail.com wrote: Yes, The docs for that gem. Either you mispelled the name or that gem doesn't exist. Check the docs, if the docs doesn't work or doesn't exists, then provide more information about the gem here and maybe somebody can

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread C K Kashyap
Maybe there's something wrong with your environment. I could install it, really straightforward. Here's my screenshot http://twitpic.com/kcoyh/full Thats the frustrating part :) ... everywhere I look, they say about ./script/plugin install git... just does not work for me ... I am going

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread C K Kashyap
just does not work for me ... I am going to do strace to see what's happening... What is your environment? Are you able to just clone the repository (without installing the plugin)? I'm on FC11 with ruby 1.9 and rails 2.3.4 I am able to clone the git repository using git clone -works just

[Rails] AssociationTypeMismatch expected Project got Project

2009-10-05 Thread Eduardo Yáñez Parareda
Using RAILS_GEM_VERSION = '2.1.2' Hello, I'm developing a plugin for another rails app. When I try to show the new form view I got this error: ActiveRecord::AssociationTypeMismatch in Audit testsController#new Project(#70348727429120) expected, got Project(#70348730882020) RAILS_ROOT:

[Rails] Question about the redirection of rails.

2009-10-05 Thread Masa Oda
Hi Everyone I have a guestion about the redirection of rails. Im using Rails 2.2.2 Is the value of url acquired from the host? HOST : 10.36.225.102: a href=http://10.36.225.102:; GET http://10.36.225.102:/ HTTP/1.1 # +Hypertext Transfer

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread Rick
There is a problem with script/plugin install git://... on Ruby 1.9. You can see: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2018 for details on how to patch rails. Fix is due with 2.3.5 On Oct 5, 6:15 am, C K Kashyap ckkash...@gmail.com wrote: just does not work for

[Rails] Re: AssociationTypeMismatch expected Project got Project

2009-10-05 Thread Eduardo Yáñez Parareda
I realized it doesn't happen in production environment ?¿ --~--~-~--~~~---~--~~ 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

[Rails] Re: Friendly_id and Rake problem.

2009-10-05 Thread Rick
Taken directly from the README.rdoc that is part of the installed package: sudo gem install friendly_id cd my_app script/generate friendly_id rake db:migrate Here's how to see the documentation for installed gems on your system. 1) create an executable file named gem_server.rb that

[Rails] Re: Unable to install plugins from github

2009-10-05 Thread C K Kashyap
On Mon, Oct 5, 2009 at 4:52 PM, Rick richard.t.ll...@gmail.com wrote: There is a problem with script/plugin install git://... on Ruby 1.9. You can see: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2018 for details on how to patch rails.  Fix is due with 2.3.5 Thank

[Rails] Re: spec testing controllers

2009-10-05 Thread James Mead
2009/10/4 Richard Schneeman rails-mailing-l...@andreas-s.net: I just started using rspec and mocha to test all of my controllers. Before I was using factory girl to test do my testing, but all those database hits really take a long time. However i'm finding i'm spending way more time writing

[Rails] Re: AssociationTypeMismatch expected Project got Project

2009-10-05 Thread Frederick Cheung
On Oct 5, 11:33 am, Eduardo Yáñez Parareda eduardo.ya...@gmail.com wrote: Using RAILS_GEM_VERSION = '2.1.2' Hello, I'm developing a plugin for another rails app. When I try to show the new form view I got this error:  ActiveRecord::AssociationTypeMismatch in Audit testsController#new

[Rails] Re: mysql + Snow Leopard + Rails

2009-10-05 Thread Michele
On 4 Ott, 22:05, tspore tsp...@gmail.com wrote: Correct, I can connect to mysql with no issues, either via terminal, or using any php app to connect to my localhost. But I fixed it today - I need to put single quotes around the 'password' . I don't know if its because I have a Symbol in

[Rails] Re: Friendly_id and Rake problem.

2009-10-05 Thread David Sousa
Hi Rick, thanks for the replay, but you did not understand my problem. I'll try to be more clear now. I'm using friendly_id as a GEM, and it is working perfectly. Because my application already has some data, I would like to generate slugs for the post that have been created already. So that

[Rails] Problem with Rails and Oracle sequences

2009-10-05 Thread Rafael Roque
Hi all, Suppose my sequence current value is '1' and I save a new record to the DB.After I call the save method,the attribute which uses the sequence has the value '2',but in the database it is '3'.I´m mapping the sequence as follows: class Viagem ActiveRecord::Base set_table_name ''

[Rails] Re: Friendly_id and Rake problem.

2009-10-05 Thread Marnen Laibow-Koser
Rick Lloyd wrote: [...] Here's how to see the documentation for installed gems on your system. 1) create an executable file named gem_server.rb that contains #!/usr/bin/env ruby require 'rubygems/server' gem_server = Gem::Server.new Gem.dir, 8089, false puts gem_server.inspect

[Rails] Re: Multiple views of the same model

2009-10-05 Thread Marnen Laibow-Koser
Jonas Latza wrote: Hi, How can I implement two different views on the same model? My model has 30 attributes. The First view should display 1-12 and the second view the rest of them. In my case I am dealing with two medical anamneses with different topics. My idea was to generate a

[Rails] Editable datagrid using wice_grid and in_place_editor?

2009-10-05 Thread C K Kashyap
Hi All, I need to create an editable data grid. What would be a good way to do it? I did not explore wice_grid much - but it does not seem to allow editing. I was wondering if I could use a combination of in_place_editor and wice_grid to achieve this. -- Regards, Kashyap

[Rails] Re: Problem with Rails and Oracle sequences

2009-10-05 Thread Greg Donald
On Mon, Oct 5, 2009 at 7:35 AM, Rafael Roque rails-mailing-l...@andreas-s.net wrote: Hi all, Suppose my sequence current value is '1' and I save a new record to the DB.After I call the save method,the attribute which uses the sequence has the value '2',but in the database it is '3'.I´m

[Rails] Re: Problem with Rails and Oracle sequences

2009-10-05 Thread Rafael Roque
someone??? -- 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 unsubscribe

[Rails] Re: Implementing a user activity log with STI. (?)

2009-10-05 Thread bitrocker
Hi, you guyes are doing what I want to implement soon. So I had some thoughts about an activity log. Pretty sure polymorphic associations are a good choice. To keep the rest clean from logging code and the logging flexible, I thought about using an observer, like class ActivityObserver

[Rails] Re: Seeking Ruby on Rails Tutorial/Screencaster

2009-10-05 Thread Ilan Berci
googlefandeveloper wrote: s of all ages, genders, education, and locations to apply. Thank you in advance for your application. We admire your talent and look forward to learning more about you. http://railscasts.com/ It will be very hard to compete with the amazing Railcasts. It has

[Rails] Re: Problem with Rails and Oracle sequences

2009-10-05 Thread Rafael Roque
Greg Donald wrote: On Mon, Oct 5, 2009 at 7:35 AM, Rafael Roque rails-mailing-l...@andreas-s.net wrote: �set_sequence_name 'sequence_name' What could be wrong? Thanks, Rafael Roque Which Oracle driver are you using? I used to have problems with the older one but now I use the

[Rails] routes configuration

2009-10-05 Thread Muruga Raj
Hello all, I need a suggestion in routes configuration. My requirement is to get all the parameters after the username in a URL, as a one string. That is, consider my url is http://example.com/raj/123/456/789/101 Here 'raj' is the username and i want to extract all the words after 'raj' as

[Rails] Re: rescue

2009-10-05 Thread Craig White
On Mon, 2009-10-05 at 00:39 -0700, Frederick Cheung wrote: On Oct 5, 4:52 am, Craig White craigwh...@azapple.com wrote: On Sun, 2009-10-04 at 14:07 -0700, Craig White wrote: On Sun, 2009-10-04 at 12:50 -0700, Craig White wrote: something changed in Rails 2.3.2 and @params and

[Rails] Re: Problem with Rails and Oracle sequences

2009-10-05 Thread Rafael Roque
just correcting... I just put ojdbc14.jar in my %jruby_home%/LIB directory -- 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,

[Rails] Re: Seeking Ruby on Rails Tutorial/Screencaster

2009-10-05 Thread Marnen Laibow-Koser
Ilan Berci wrote: googlefandeveloper wrote: s of all ages, genders, education, and locations to apply. Thank you in advance for your application. We admire your talent and look forward to learning more about you. http://railscasts.com/ It will be very hard to compete with the amazing

[Rails] Re: rescue

2009-10-05 Thread Frederick Cheung
On 5 Oct 2009, at 15:14, Craig White wrote: so it appears that session.instance_variable_get(@data) gets me nothing of value and I wanted the current session hash here, but I don't know how to get this from the changed Rails. Yes, this is definitely changed in Rails 2.3 and pretty

[Rails] Re: My App doesn't send mails

2009-10-05 Thread Tony
These are my mail settings: config.action_mailer.delivery_method = :sendmail config.action_mailer.raise_delivery_errors = true # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = http:// assets.example.com

[Rails] Migrations running errantly

2009-10-05 Thread Terri I.
What would make migrations run unexpectedly? We ran cap deploy:migrations and did not expect any migrations to run since none had been changed. The schema_migrations table was there and contained the appropriate value for the last valid migration. But for some reason, the migrations started

[Rails] Re: text_field_with_auto_complete question

2009-10-05 Thread Me
anybody? On Sep 30, 1:00 pm, Jeff cohen.j...@gmail.com wrote: On Sep 30, 11:05 am, Me chabg...@gmail.com wrote: This code below will display Search Friends in the text box IF {:select = 'friend'}  is not there and the ajax call also does not work.  Any ideas how to get the text and to

[Rails] Re: Auto print???

2009-10-05 Thread Jeffrey Lee
If the server is connected to the printer, you could have the server print the orders. Alternatively, you could setup something on a machine in the restaurant so that it prints out emails based on some filter. I looked into doing something similar with PDF reports. The PDF spec allows auto

[Rails] Re: Atom Feed

2009-10-05 Thread djolley
Did you define the new route on config/routes.rb? No; and, that seems to be what I have to do. I was hoping that I wasn't going to have to tweak the routes.rb file. I sort of like having it pristine in its out-of-the-box state. Oh well. Problem solved. Thanks so much for the input.

[Rails] Re: Can't access http://localhost:3000

2009-10-05 Thread ivmafo
mmm... probablemente el error sea causado por que en las preferencias de red de firefox no este agregada localhost... en firefox ... Editar(Edit) |_Preferencias(Preferences) |_ Tab Red(Network) - boton(button) Configuracion(Configuration) - Without(Sin) proxy or

[Rails] Re: Friendly_id and Rake problem.

2009-10-05 Thread David Sousa
I was looking into this ticket ( https://rails.lighthouseapp.com/projects/8994/tickets/59 ) and found out that this is a problem that every gem faces. If someone knows a stable solution, pleas contact me. Thanks. David Sousa -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Calculating business day

2009-10-05 Thread Ludmila Moraes
Look guys, I found a way to discover the holidays. Visit the site: code.dunae.ca/holidays have a gem holidays, this helped me a lot, and I just want share this information that I founded. 2009/9/29 Stephen sblackst...@gmail.com We use a table of holidays here... So take your two dates..

[Rails] Re: Get and Set method in Ruby on Rails

2009-10-05 Thread Greg Donald
On Mon, Oct 5, 2009 at 12:42 AM, venki venkiwh...@gmail.com wrote: Hi, I working on Ruby on Rails.I using Ajax in that.While using pagination in my application first time only I want to give request to Mysql Data Base ,If user click second page it should not take from database. Here I can

[Rails] Friendly From Address

2009-10-05 Thread Ian
What is the right way to set the friendly part of the from address in an email? This works: from no-re...@mysite.com But this does not... (No error message, the email just never arrives): from My Site no-re...@mysite.com

[Rails] auto_link open new window

2009-10-05 Thread Me
This code is not opening the link in a new window. Any ideas? %= auto_link(@post, :href_options = { :target = '_blank' }) % --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Re: Browser can't display the ruby part in rhtml

2009-10-05 Thread Marnen Laibow-Koser
Browny Lin wrote: I create a simple .rhtml file hello.rhtml in the view folder of the rails app. html head titleHello World/title /head body pHello World!/p p%= 'Hello Dynamic World' %/p /body /html The problem is when I run the web server and load the

[Rails] Re: Browser can't display the ruby part in rhtml

2009-10-05 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: Browny Lin wrote: I create a simple .rhtml file hello.rhtml in the view folder of the rails app. [...] Ack! Didn't notice this when posting the first time around...if you're using Rails 2.x, that should be hello.html.erb . If your tutorial is using the .rhtml

[Rails] Re: auto_link open new window

2009-10-05 Thread Marnen Laibow-Koser
Chris Habgood wrote: This code is not opening the link in a new window. Any ideas? %= auto_link(@post, :href_options = { :target = '_blank' }) % What does the generated HTML look like? Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via

[Rails] Re: auto_link open new window

2009-10-05 Thread Chris Habgood
normal without the target= _blank On Mon, Oct 5, 2009 at 1:43 PM, Marnen Laibow-Koser rails-mailing-l...@andreas-s.net wrote: Chris Habgood wrote: This code is not opening the link in a new window. Any ideas? %= auto_link(@post, :href_options = { :target = '_blank' }) % What does the

[Rails] Re: auto_link open new window

2009-10-05 Thread Colin Law
2009/10/5 Me chabg...@gmail.com: This code is not opening the link in a new window.  Any ideas? %= auto_link(@post, :href_options = { :target = '_blank' }) % I have seen suggestions that there is an error in the docs for auto_link and that it should be :html = {} rather than :href_options =

[Rails] Re: Friendly From Address

2009-10-05 Thread Philip Hallstrom
This isn't super helpful, but I saw someone with a similar problem -- but it was throwing an error a couple of weeks ago. Memory is there was a change in ActionMailer or TMail or something like that. I'd check the commit logs in those areas and see if you see it. Or maybe it was a

[Rails] Re: auto_link open new window

2009-10-05 Thread Chris Habgood
Ya that worked. Thanks, I should have tried that. DOH! On Mon, Oct 5, 2009 at 1:52 PM, Colin Law clan...@googlemail.com wrote: 2009/10/5 Me chabg...@gmail.com: This code is not opening the link in a new window. Any ideas? %= auto_link(@post, :href_options = { :target = '_blank' }) %

[Rails] Re: Friendly From Address

2009-10-05 Thread Craig White
On Mon, 2009-10-05 at 10:26 -0700, Ian wrote: What is the right way to set the friendly part of the from address in an email? This works: from no-re...@mysite.com But this does not... (No error message, the email just never arrives): from My Site

[Rails] ActiveRecord Polymorphic Inheritance

2009-10-05 Thread RubyNewbie
I am using RoR ActiveRecord polymorphic inheritance and was wondering if it's possible to access the base class' association methods in the invocation of either to_xml or to_json without having to depict the base class data in the serialized string. Here are my classes: # base class class Asset

[Rails] Re: Get and Set method in Ruby on Rails

2009-10-05 Thread Tim Lowrimore
Well, you're not going to be doing this in Ruby, since HTTP is stateless. Since you're using AJAX, you might as well store your entire resultset as JS, and fetch each page from your local collection. That said, maybe you should look at Mislav will_paginate

[Rails] newcomer of ROR

2009-10-05 Thread silver
I was trying to build a blog webpage. I followed the steps of cookbook2. Now I want to add some new functions to my blog system.That is, I want to show all blogs that belongs to one category when I click the category's name on category/list.rhtml.Also, I want to add a new link to view all the

[Rails] doing creates on has_many_through associations with :conditions?

2009-10-05 Thread Eric Hahn
I'm confused about something I thought should work. I have tables Users and Blogs, joined together through Memberships. Membership also has a boolean for moderator-ness. So, the Blog model looks like this: class Blog ActiveRecord::Base has_many :memberships has_many :users,

[Rails] Re: undefined method `^' for d:String

2009-10-05 Thread benoror
I confirm that just replacing RAILS_GEM_VERSION outputs the same error. Is there a workaround for this ? On Sep 12, 7:37 pm, LF lfalca...@gmail.com wrote: Thanks Fred. That solved my problem. I Installed version 2.3.3 and then I had to rebuild the application from scratch, because only

[Rails] NEWBIE using flickr_fu, impossible to retrieve a user's tags list

2009-10-05 Thread Olivier R
Retrieving images using tags : OK! def index flickr = Flickr.new(File.join(RAILS_ROOT, 'config', 'flickr.yml')) @photos = flickr.photos.search(:user_id = 12323423...@n05, :tags = params[:tag], .. end - How can I retrieve my list of TAGS from

[Rails] domain names within app

2009-10-05 Thread Clark
Hi- I have an shopping cart rails app. I would like to be able to host multiple domain names within the same shopping cart application. I would like to be able to detect the domain name, and then set a parameter that tells what logo to display for that domain name. Does anyone know how this

[Rails] Validation message for update

2009-10-05 Thread Gayu
I have used the same method as you suggested.But Error message is not gets updated to master table when there is no other errors in it.kindly update me solution for this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: undefined method `^' for d:String

2009-10-05 Thread Frederick Cheung
On Oct 5, 8:58 pm, benoror beno...@gmail.com wrote: I confirm that just replacing RAILS_GEM_VERSION outputs the same error. Is there a workaround for this ? you could remove the corresponding line from new_rails_defaults.rb - sounds like the version 2.3.4 generates by default contains an

[Rails] Re: Problem using ActiveRecord find with :joins and :select

2009-10-05 Thread PierreW
Thanks a lot guys for clarifying this. It worked with the aliases as you suggested. Fred, to your last point: sorry about that, you are right. I just made up the example to show the mechanics, I didn't realize it didn't quite make any sense. Peter On Oct 5, 8:37 am, Frederick Cheung

[Rails] ajaxy select boxes and existing records

2009-10-05 Thread Matt Harrison
I've just made my first form using select boxes that update each other via observe_field. It works really well for the creation of record and it's making the form a whole lot nicer to use. The problem is editing records, the first select box is not part of the model but is used to populate

[Rails] Re: Browser can't display the ruby part in rhtml

2009-10-05 Thread Norm Scherer
Marnen Laibow-Koser wrote: Marnen Laibow-Koser wrote: Browny Lin wrote: I create a simple .rhtml file "hello.rhtml" in the "view" folder of the rails app. [...] Ack! Didn't notice this when posting the first time around...if you're using Rails

[Rails] Re: newcomer of ROR

2009-10-05 Thread Eric
On Oct 5, 12:36 pm, silver liuchen7...@gmail.com wrote: But I have trouble with how to do it. I want to call the category's list action from blog/list.rhtml but I don't know how to do it. What have you tried so far? -eric --~--~-~--~~~---~--~~ You received this

[Rails] Re: domain names within app

2009-10-05 Thread Hassan Schroeder
On Mon, Oct 5, 2009 at 12:14 PM, Clark clarksla...@gmail.com wrote: I would like to be able to detect the domain name, and then set a parameter that tells what logo to display for that domain name. Have you looked at the doc for the request object? -- Hassan Schroeder

[Rails] Re: mongrel, static files, and haproxy healtchecks

2009-10-05 Thread buddy12lbcat
further investigation leads me to think this is true. i can make my app sleep for 60 seconds and i don't get it marked as down or show missed health checks in haproxy. the one caveat is that if i delete the check.txt from my public directory then i get missing file check.txt in my rails

[Rails] DRY model validation question

2009-10-05 Thread Dudebot
Here's a question: I have the exact same validation code in 2 different models. OK, you're thinking, combine the models. Not in this case. So, in Rails, is there a way to reference the same validation for 2 different models? E.g. validate :foo def foo bar end Appears in

[Rails] Complex form validation problem

2009-10-05 Thread fahrio
I have a complex form for my Work model. It accepts nested attributes for Credits, Images and Videos. (it is a modified version of Eloy Duran's complex form example) I want to validate presence of at least one Credit I want to validate presence of at least one Image or one Video When I do (in

[Rails] Re: newcomer of ROR

2009-10-05 Thread heimdull
Not sure what you have done so far BUT I think this will do %= link_to All, blogs_categories_path(@blog) % --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Re: Browser can't display the ruby part in rhtml

2009-10-05 Thread Browny Lin
Thanks for your information, Marnen Laibow-Koser My rails is 2.3.4, I change the file hello.rhtml to hello.html.erb But the browser still just show the first line, and doesn't show anything inside %= XXX %, do I miss something? Many many thanks again Marnen Laibow-Koser wrote: Marnen

[Rails] Re: DRY model validation question

2009-10-05 Thread Stephan Wehner
On Oct 5, 4:42 pm, Dudebot craign...@gmail.com wrote: Here's a question: I have the exact same validation code in 2 different models. OK, you're thinking, combine the models.  Not in this case. So, in Rails, is there a way to reference the same validation for 2 different models? Commonly

[Rails] How to create editable data grid using rails?

2009-10-05 Thread C K Kashyap
Hi All, I need to work with an editable data grid. I have not found anything yet - Extjs seems good. But I want to make sure if Rails does not already have something built in or something more rails like already available. -- Regards, Kashyap

[Rails] Updating multiple tables with one form

2009-10-05 Thread ryan8720
Hi all, Here is the setup: I'm writing an application to model a house. Houses have rooms. I need the room to have a name, an id, and then one or more lights. Each light has wattage, hours_per_day, and quantity. I'd also like the room to have many small_appliances, but I haven't gotten that

[Rails] The only time you should use STI is when...

2009-10-05 Thread jko170
the record changes between STI models/classes. --~--~-~--~~~---~--~~ 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 unsubscribe from

[Rails] [ANN] rspec 1.2.9 Released

2009-10-05 Thread David Chelimsky
rspec version 1.2.9 has been released! * http://rspec.info * http://rubyforge.org/projects/rspec * http://github.com/dchelimsky/rspec/wikis * rspec-us...@rubyforge.org * rspec-de...@rubyforge.org Behaviour Driven Development for Ruby. Changes: ### Version 1.2.9 / 2009-10-05 * enhancements

[Rails] [ANN] rspec-rails 1.2.9 Released

2009-10-05 Thread David Chelimsky
rspec-rails version 1.2.9 has been released! * http://rspec.info * http://rubyforge.org/projects/rspec * http://github.com/dchelimsky/rspec-rails * http://wiki.github.com/dchelimsky/rspec/rails * rspec-de...@rubyforge.org Behaviour Driven Development for Ruby on Rails. Changes: ### Version

[Rails] Errno::EADDRINUSE

2009-10-05 Thread Ralu Rm
= Booting WEBrick = Rails 2.3.4 application starting on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server [2009-10-06 09:50:03] INFO WEBrick 1.3.1 [2009-10-06 09:50:03] INFO ruby 1.8.6 (2007-09-24) [i386-linux] [2009-10-06 09:50:03] WARN TCPServer Error: Address already

[Rails] Re: domain names within app

2009-10-05 Thread Priyanka Pathak
Clark wrote: Hi- I have an shopping cart rails app. I would like to be able to host multiple domain names within the same shopping cart application. I would like to be able to detect the domain name, and then set a parameter that tells what logo to display for that domain name.

[Rails] strange to_formatted_s problem

2009-10-05 Thread boblu
my time zone is set like this config.time_zone = 'Tokyo' I got this from console temp1.updated_at = Tue, 06 Oct 2009 13:26:57 JST +09:00 temp1.updated_at.to_formatted_s(:db) = 2009-10-06 04:26:57 temp1.updated_at.to_formatted_s(:long) = October 06, 2009 13:26 Can anyone tell me why I get