[Rails] Re: Gem install/update errors

2010-04-21 Thread artixan
Check your Gem sources with: `gem sources` and remove http://gems.rubyonrails.org if it's listed. The main rubyonrails.org domain is down. ihth --arnie riquelme On Apr 20, 8:58 am, Stacy Vlasits li...@ruby-forum.com wrote: %USERPROFILE%\Documents\Programs\rails_apps\history gem update rails

[Rails] solving the error when running gem install or gem update

2010-04-21 Thread roy
when seeing ERROR: While executing gem ... (ArgumentError) uri scheme is invalid try looking into your gem sources run gem sources and then remove all weird or unnecessary sources until you are left with only http://gems.rubyforge.org then try to install or update a gem and you'll

[Rails] Why not Rails with FastCGI?

2010-04-21 Thread Sven Svenson
When I started using Rails around version 0.9, FastCGI was considered one of the best ways to deploy Rails. That went out of fashion but I don't know why. Then Mongrel was the hot thing and I've heard about Phusion Passenger. What is wrong with deploying Rails with FastCGI? Was it just some sort

[Rails] Re: Gem install/update errors

2010-04-21 Thread Wayne
Try doing a gem sources and see if one of your sources is http://gems.rubyonrails.org If it is, remove it with gem sources --remove http://gems.rubyonrails.org;. I had the same problem today, I think it is related to the issue that rubyonrails.org is having with their domain name. ~W On Apr 20,

[Rails] [JOBS] Unusual UnHappy-Couples Startup needs Tech Advisor for One Time only or 2hrs/wk

2010-04-21 Thread eCoupleCoach
Tech Advisor to Unusual Social Venture Startup This position is for an unusual Social Venture Internet Startup which will be using a robust conceptual advance web application to help the 95% of unhappy marriages/ couples in general in the Western Hemisphere who cannot afford or will not trust a

Re: [Rails] Re: api.rubyonrails.org / guides.rubyonrails.org

2010-04-21 Thread Wang Li
http://railsapi.com is perfect 2010/4/21 Wang Li fox...@gmail.com does anyone know the ip of rubyonrails.org? then we could set it in our hosts file and visit the site properly or any docs mirror sites? I want docs... 2010/4/21 Vikrant Chaudhary nas...@gmail.com bump. On Apr 21,

Re: [Rails] Re: api.rubyonrails.org / guides.rubyonrails.org

2010-04-21 Thread Wang Li
does anyone know the ip of rubyonrails.org? then we could set it in our hosts file and visit the site properly or any docs mirror sites? I want docs... 2010/4/21 Vikrant Chaudhary nas...@gmail.com bump. On Apr 21, 1:50 am, Dieter Lunn coder2...@gmail.com wrote: The registrar is being a

[Rails] [ANN]VTD-XML 2.8

2010-04-21 Thread Jimmy Zhang
VTD-XML 2.8 has been released. Please visit https://sourceforge.net/projects/vtd-xml/files/ to download the latest version. a.. Expansion of Core VTD-XML API a.. VTDGen adds support for capturing white spaces b.. VTDNav adds support for suport for getContentFragment(), recoverNode()

[Rails] Re: Why not Rails with FastCGI?

2010-04-21 Thread Frederick Cheung
On Apr 21, 3:03 am, Sven Svenson svensvens...@gmail.com wrote: When I started using Rails around version 0.9, FastCGI was considered one of the best ways to deploy Rails. That went out of fashion but I don't know why. Then Mongrel was the hot thing and I've heard about Phusion Passenger.

[Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Frederick Cheung
On Apr 21, 12:28 am, Philip Hallstrom phi...@pjkh.com wrote: Go here and download whatever set of rdocs you need... then you don't   have to worry about the official site anymore :) or generate the docs locally (rake doc:rails) like that you don't have to worry about having an internet

[Rails] Re: Caching of data on server?

2010-04-21 Thread Pieter Hugo
Hi Guys Thanks for the ideas. Some good stuff here to look into. After thinking about this a bit more I'd like to slightly rephrase my question: Is it possible to create variables in the rails environment that persist globally - not as sessions - that would be too much porting of information

Re: [Rails] Select inside a hidden div

2010-04-21 Thread Colin Law
On 21 April 2010 05:38, Bob Smith bsm...@gmail.com wrote: Is there any way to use select inside a hidden div block with a model object for the select items ? I have the block showing and hiding OK with observe_field, but the variable I'm using to see whether to show/ hide seems to be the only

[Rails] how to monitor generated SQL output?

2010-04-21 Thread Fearless Fool
Pardon if this has been asked a dozen times before (a quick search on the forum didn't turn up anything obvious): For purposes of really understanding ActiveRecord, is there an easy way to watch the SQL generated calls to ActiveRecord.find() etc? I'm running in the console -- not under a web

Re: [Rails] Re: Conditionally adding a link to a form -- how?

2010-04-21 Thread Colin Law
On 21 April 2010 05:46, Bob Smith bsm...@gmail.com wrote: Try using params instead of variables. The variables lose scope when changing between views/controllers and once that happens, the value becomes nil. Instead of @show_new_expanse_page = true try params['new_expense_page'] = true and

[Rails] Re: how to monitor generated SQL output?

2010-04-21 Thread Frederick Cheung
On Apr 21, 8:30 am, Fearless Fool li...@ruby-forum.com wrote: Pardon if this has been asked a dozen times before (a quick search on the forum didn't turn up anything obvious): For purposes of really understanding ActiveRecord, is there an easy way to watch the SQL generated calls to

[Rails] Re: Spring Cleaning

2010-04-21 Thread Matt
David, I've recently been doing a lot of apps that require users being logged in and different users having different permissions in the apps. If an entire controller requires a user being logged in, set a before filter. If your app allows non logged in visitors or you want all of your admin

[Rails] Re: Best practice around putting rails database info into git

2010-04-21 Thread Matt
Pito, I'm going to leave the entire db version control question for someone else, but to answer your question about the schema.rb, if you run a migration, it will change the structure of the database, which is what schema.rb keeps track of. Rails will rewrite that file every for every migration

Re: [Rails] A way to build title

2010-04-21 Thread Alexandre Friquet
Hi Thomas, How might I clean this up? My ideal would be for each controller to be able to call title setting its part of the title, and for individual actions to manually prepend their title part: You may have a look to this screencast from Ryan Bates :

Re: [Rails] Re: Smart localisation

2010-04-21 Thread Alexandre Friquet
Hi, If I should believe the things I find on the internet, this is the correct approach for form labels: --- en: activerecord: attributes: user: last_name: Surname --- And then: % form_for @user do |f| % %= f.label :last_name % %= f.text_field :last_name % % end

[Rails] Migrating restful_authentication

2010-04-21 Thread DanC
Hi, I was wondering if anyone is familiar with restful_authentication plugin. I have an app which uses restful_authentication and I am creating a new app which will exist at a seperate url. However, I would like users who have registered on app1 to be able to log into app2 without having to

[Rails] Re: Migrating restful_authentication

2010-04-21 Thread Sharagoz
Why not use the user table in the old DB for everything instead of duplicating the information in both tables? On Apr 21, 10:01 am, DanC d.m.coleg...@durham.ac.uk wrote: Hi, I was wondering if anyone is familiar with restful_authentication plugin. I have an app which uses

[Rails] Re: Migrating restful_authentication

2010-04-21 Thread DanC
HI Sharagoz, How would I do this? At a guess, I could probably use establish_connection (point to app1 DB) in the User.rb and Permission.rb model files of app2 Is there another way? Thanks for the quick response, Dan On 21 Apr, 09:05, Sharagoz shara...@gmail.com wrote: Why not use the user

[Rails] Re: Spring Cleaning

2010-04-21 Thread Sharagoz
% if current_user % %= link_to Create a new BLAH, new_blah_path % % end % To reduce this to one line you can do %= link_to(Create a new BLAH, new_blah_path) If(currrent_user) % Authorization with something like CanCan or Declarative Authorization is still going to require an if-test in the view

[Rails] Re: how to monitor generated SQL output?

2010-04-21 Thread Fearless Fool
Frederick Cheung wrote: It should still all go into the log file (in development mode at least). Fred You're right as always! :) Somehow, I got my script/console session in a state where it wasn't logging to log/development.log (not even Rails.logger.debug() was working). I quit and

[Rails] Re: Migrating restful_authentication

2010-04-21 Thread Sharagoz
Add a new DB connection in database.yml other_db_development: adapter: mysql database: other_db_development (etc) Then in User.rb make it use that connection like so: class User ActiveRecord::Base establish_connection(:other_db_development) end Every CRUD operation on the User model will

[Rails] Re: Rejecting a nested object if all attributes are blank

2010-04-21 Thread ES
that works, thanks! On Apr 14, 5:38 pm, Abhinav Saxena abhinav...@gmail.com wrote: You can do like this using all? method accepts_nested_attributes_for :questions, :allow_destroy = true,   :reject_if = lambda { |attrs| attrs.all? { |k, v| v.blank?}} -- Thanks,

[Rails] Re: display utf 8 characters in text fields in edit page

2010-04-21 Thread ES
I have still not found a solution to this. Does anyone have an idea? On Apr 14, 6:47 pm, ES emsto...@gmail.com wrote: I'm running Rails 2.3.5 On Apr 14, 2:34 pm, Mikel Lindsaar raasd...@gmail.com wrote: On 14, April 2010, at 14 Apr 19:58, ES wrote: I have no problems displaying data

Re: [Rails] Re: display utf 8 characters in text fields in edit page

2010-04-21 Thread Amala Singh
I think it could be browser issue. Check your addons in your browsers or try different clean browsers to see the issue occurring. Maybe desktop has been configured to ascii language editor. Try in a different computer. Make sure that Database columns are utf8 compatible in the database.

Re: [Rails] [JOBS] Unusual UnHappy-Couples Startup needs Tech Advisor for One Time only or 2hrs/wk

2010-04-21 Thread kannav rajeev
how can i apply for this job and can i do this remotly? On Wed, Apr 21, 2010 at 10:06 AM, eCoupleCoach ecoupleco...@gmail.comwrote: Tech Advisor to Unusual Social Venture Startup This position is for an unusual Social Venture Internet Startup which will be using a robust conceptual advance

[Rails] Anyone else notice that http://api.rubyonrails.org has been hijacked?

2010-04-21 Thread Amala Singh
??? -- 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 unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options,

Re: [Rails] Anyone else notice that http://api.rubyonrails.org has been hijacked?

2010-04-21 Thread Andy Jeffries
Yes. Yesterday called, they want their news back... http://twitter.com/#search?q=rubyonrails.org -- Andy Jeffries http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS Company number: 5452840 On 21 April 2010 10:09, Amala

[Rails] Re: Anyone else notice that http://api.rubyonrails.org has been hijacked?

2010-04-21 Thread Sharagoz
Yep, happened last year as well. The site is available at rubyonrails.com until the issue is resolved. DHH got some tweets about it: http://twitter.com/dhh On Apr 21, 11:09 am, Amala Singh amalasi...@gmail.com wrote: ??? -- You received this message because you are subscribed to the Google

Re: [Rails] Anyone else notice that http://api.rubyonrails.org has been hijacked?

2010-04-21 Thread kannav rajeev
http://www.railsbrain.com/api/rails-1.2.3/doc/index.html http://www.railsapi.com/ For now On Wed, Apr 21, 2010 at 2:45 PM, Andy Jeffries andyjeffr...@gmail.comwrote: Yes. Yesterday called, they want their news back... http://twitter.com/#search?q=rubyonrails.org -- Andy Jeffries

[Rails] Re: Smart localisation

2010-04-21 Thread Sharagoz
For the label problem I have been using the I18n-label plugin in the past: http://github.com/iain/i18n_label This functionality may be integrated into the latest version of I18n, I dont know. On Apr 21, 9:50 am, Alexandre Friquet a...@infopiiaf.fr wrote: Hi, If I should believe the things

[Rails] Need to convert postgres database to mysql

2010-04-21 Thread Neetin Kumar
Hi, Need script to convert postgres db dump and restore to mysql. Please help me. Thanks in advance. -- 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] Re: Smart localisation

2010-04-21 Thread jhaagmans
Hmmm, thank you both. A fix for the labels appears to be in the latest version of the Rails 2-3-stable branch. Is there any way to integrate that version of Rails into my application? Please mind that I won't have access to the Rails installation on the target server, so I need to overwrite the

[Rails] Rails on DB2

2010-04-21 Thread Simon Macneall
Hi, We have a potential requirement to convert our existing rails app to run on DB2. I've had a bit of a look around and there is a DB2 active record gem. Does anyone have any experience with this? Is it a robust solution (if not, I can push back at the powers that be)? Thanks Simon --

[Rails] firefox 3.6 not caching css and js files

2010-04-21 Thread tonypm
I have an in house app that has been running for several years, with regular enhancements. Just recently I have noticed that on windows clients, firefox 3.6 is no longer caching any css or js pages. Watching the pages load in firebug, they are all showing as : 304 Not modified but are re-loading

[Rails] Sorting posts

2010-04-21 Thread DanC
Hi, I have a topic model which has_many replies. On my topic index page I would like to be able to sort the topics by the number of replies. In my topic model I have defined Topic.rb ... has_many :replies def total_replies replies.count end And in my controller I have tried

Re: [Rails] Sorting posts

2010-04-21 Thread Juan José Vidal
I think that's you could use the counter_cache feature: class AddReplyCount ActiveRecord::Migration def self.up add_column :topics, :replies_count, :integer, :default = 0 Project.reset_column_information Topic.find(:all).each do |t| t.update_attribute(:replies_count,

Re: [Rails] Sorting posts

2010-04-21 Thread Michael Pavling
On 21 April 2010 12:10, DanC d.m.coleg...@durham.ac.uk wrote: @topics = Topic.find(:all, :conditions = [forum_id = ?, @forum.id], :order = total_replies DESC) but I get the error Mcolumn total_replies does not exist I know the column doesn't exist, but the question is, how can I get the

[Rails] problem with partial rendering for groups of objects

2010-04-21 Thread Adler Santos
I have a total of 30 Project thumbnails that I'm planning to render in groups of 8 in my index page. I'm going to put a next button that will replace the present group with the next 8 thumbnails, and so on until one gets to the final group of thumbnails. My codes are working but only for the first

[Rails] Re: problem with partial rendering for groups of objects

2010-04-21 Thread Adler Santos
Errata: Replace % form_remote_tag :url = {:action = next, :remaining = @everything} do % with % form_remote_tag :url = {:action = next, :remaining = @remaining} do %. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: Best practice around putting rails database info into git

2010-04-21 Thread Pito Salas
Matt, Thanks for a great summary; very helpful, and thanks to the rest of the list for always providing insightful comments and solutions to problems. Great!! - Pito Matt wrote: Pito, I'm going to leave the entire db version control question for someone else, but to answer your question

[Rails] Almost not a technical question

2010-04-21 Thread Greg Ma
Hi, I would like to develop a paying system like Groupon.com does. For those who don't know about groupon, you can purchase coupon only if the coupon as been sold n number of times. But when you pay you are charged only if the limit number of people has been reached. This means then save somehow

[Rails] habtm relation, cannot populate join table

2010-04-21 Thread Veena Jose
Hai friends, I hav two models related with habtm class User ActiveRecord::Base has_and_belongs_to_many :station, :join_table = stations_users, :foreign_key = user_id, :association_foreign_key = station_id class

[Rails] habtm relation, cannot populate join table

2010-04-21 Thread Veena Jose
Hai friends, I hav two models related with habtm class User ActiveRecord::Base has_and_belongs_to_many :station, :join_table = stations_users, :foreign_key = user_id, :association_foreign_key = station_id class

[Rails] Continously running a script

2010-04-21 Thread tashfeen.ekram
I am writing a rails script that I need to run continuosly. It basiclly scans the a particular table in my DB and makes queries to an outside service and updates the table as needed. I would like to keep the script constatnly running run. If I write the script as a runner, is there a way to do

[Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Rick
Any idea on how long it takes to recover from this annual screw-up? Eyecandy and grublinks are no substitute for a productive community site. Rick On Apr 21, 2:13 am, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 21, 12:28 am, Philip Hallstrom phi...@pjkh.com wrote: Go here and

[Rails] Re: STI Design Questions

2010-04-21 Thread Sharagoz
The questions and alternatives are going to be stored in the database, right? So basically somebody like a teacher can create a quiz that has many questions, which has many alternatives, and the students take a quiz where he responds to questions by picking alternatives or writing an essay. What

Re: [Rails] Continously running a script

2010-04-21 Thread Peter Hickman
By continuously do you mean 'scan table, scan table, scan table ...' or 'scan table, wait for 10 minutes, repeat' If it is the latter then you could simply set up a cron job to run every few minutes. Here's some details on how you might do it

[Rails] Is it possible to generate a breadcrumb from Rails controller?

2010-04-21 Thread Joshua Partogi
Dear all, Is it possible to generate a breadcrumb from Rails controller without using any additional plugin? What methods should I look into to be able to generate breadcrumb in Rails? Thank you very much in advance for your assistance. Kind regards, Joshua -- http://twitter.com/scrum8 --

[Rails] Re: Gem install/update errors

2010-04-21 Thread Stacy Vlasits
Thanks Wayne and Arnie, That did it. artixan wrote: Check your Gem sources with: `gem sources` and remove http://gems.rubyonrails.org if it's listed. The main rubyonrails.org domain is down. ihth --arnie riquelme -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] This works, but it can't be best practice. Advice?

2010-04-21 Thread paron
I want to display all the projects in which a given team has a product. The following code works, but isn't there a better way? Railsier? Better Practice? #Models# class Team ActiveRecord::Base has_many :products has_many :funding_sources, :through=:products end class Product

[Rails] map a resource to another controller

2010-04-21 Thread rtacconi
Hi, I have a Page controller. I use it as a tree structure to manage pages in a CMS. Is it possible to map an address /pages/1 to another controller, say /forum ? I need it because not every page should be a CMS page but sometimes it should display another module, a forum, a gallery... etc...

Re: [Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Amala Singh
This is a sign of ROR losing credibility. It is such a shame that it has happened to a wonderful innovation. Why they are going for RoR3 and so on, if they cannot maintain the existing things better? On 21 April 2010 13:18, Rick richard.t.ll...@gmail.com wrote: Any idea on how long it takes to

[Rails] how to change photo size from 300k - 100k?

2010-04-21 Thread Chandle WEi
In ruby how to change photo size from 300k - 100k? have any methods? -- 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 unsubscribe from this group, send email to

Re: [Rails] how to change photo size from 300k - 100k?

2010-04-21 Thread Ivan Nastyukhin
imagemagic -quality On Apr 21, 2010, at 5:18 PM, Chandle WEi wrote: In ruby how to change photo size from 300k - 100k? have any methods? -- 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] Re: This works, but it can't be best practice. Advice?

2010-04-21 Thread paron
Well, this is a little better. . . . else fundin...@team.funding_sources project_ids = fundings.reduce([]){|items, funding| items.push(funding.project_id)} @projects = Project.find(:all, :conditions=[id IN (?), project_ids.uniq]) end . . . So, now the problem becomes: how

[Rails] Re: Anyone know of a Rails POS (point-of-sale) app?

2010-04-21 Thread Jason Richelson
jko170 wrote: I might need to integrate one with my Rails app. We have built a web pos system using Ruby called ShopKeep.com. Rails is turning out to be very good framework for this project. We will officially launch in May but we already have customers up and running using it. Our API

[Rails] Re: Continously running a script

2010-04-21 Thread tashfeen.ekram
Actually, I am interested in the former. That is, scan table and once it is done start form the top again and scan again without any delay. Thanks for the resource. On Apr 21, 8:25 am, Peter Hickman peterhickman...@googlemail.com wrote: By continuously do you mean 'scan table, scan table, scan

Re: [Rails] Re: Anyone know of a Rails POS (point-of-sale) app?

2010-04-21 Thread agung sukariman putra
its that true brother ? amazing,.. i'll check soon.. -- 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 unsubscribe from this group, send email to

Re: [Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Peter De Berdt
On 21 Apr 2010, at 14:56, Amala Singh wrote: This is a sign of ROR losing credibility. It is such a shame that it has happened to a wonderful innovation. Why they are going for RoR3 and so on, if they cannot maintain the existing things better? What a pointless remark. 37signals paid the

[Rails] .each do iteration question

2010-04-21 Thread Babos Catalin
I got a simple iteration going on % @user.sender.each do |sender| % ... % end % Can I fetch and display for example only 2 items from my database insted of all 4 of them ? Is there a better way to do this ? I could use will_paginate on the iteration (per_page = 2) but I don`t want the links to

[Rails] [ANN] Red Dirt Registration Ending

2010-04-21 Thread JEG2
Rubyists: Friday is the last day for normal registration to the Red Dirt RubyConf. We have everything locked-in and it's going to be an awesome event. Here are just a handful of the planned highlights: * Keynote speeches from Jim Weirich and Dave Thomas * Our themed program including Rails 3,

Re: [Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Amala Singh
Pointless remark? Ha. Cant this be avoided for the second time if not for the first time? I dont still believe this it could happen to ROR. On 21 April 2010 15:26, Peter De Berdt peter.de.be...@pandora.be wrote: On 21 Apr 2010, at 14:56, Amala Singh wrote: This is a sign of ROR losing

Re: [Rails] Almost not a technical question

2010-04-21 Thread Hassan Schroeder
On Wed, Apr 21, 2010 at 5:05 AM, Greg Ma li...@ruby-forum.com wrote: But when you pay you are charged only if the limit number of people has been reached. This means then save somehow your credit card number somewhere and charged you when the sell is done. My question is how, where do they

[Rails] Re: .each do iteration question

2010-04-21 Thread Kleber Shimabuku
limiting the Find method in the controller. eg: @user = User.find(:all, :limit = 2) Hope it helps! On Apr 21, 11:27 pm, Babos Catalin li...@ruby-forum.com wrote: I got a simple iteration going on % @user.sender.each do |sender| % ... % end % Can I fetch and display for example only 2

[Rails] Re: Continously running a script

2010-04-21 Thread Stephan Wehner
On Apr 21, 7:17 am, tashfeen.ekram tashfeen.ek...@gmail.com wrote: Actually, I am interested in the former. That is, scan table and once it is done start form the top again and scan again without any delay. http://cr.yp.to/daemontools.html should help (on Unix). Your Ruby script has an

[Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Moo
Pointless remark? Ha. Cant this be avoided for the second time if not for the first time? I dont still believe this it could happen to ROR. it's not the freaking rails framework man. it's the domain name registrar. On Apr 21, 7:39 am, Amala Singh amalasi...@gmail.com wrote: Pointless remark?

Re: [Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Shiv Narayan Gautam
DHH just tweeted saying that the domain is back up. Waiting for all the DNS servers to cache it. And the domain is registered for 10 years. So there you go Amala. Happy now :) On Wed, Apr 21, 2010 at 8:31 PM, Moo janec...@gmail.com wrote: Pointless remark? Ha. Cant this be avoided for the

[Rails] Re: A way to build title

2010-04-21 Thread Thomas Allen
Thanks, that seems to be the right idea. Here's what I ultimately settled on...the following results in Home | Dashboard | PNC for a request to DashboardController#index. class ApplicationController ActionController::Base def self.title item before_filter do |controller|

Re: [Rails] Re: api.rubyonrails.org site is taken over by a domain squatter

2010-04-21 Thread Amala Singh
Good news. Thank you. On 21 April 2010 16:05, Shiv Narayan Gautam s.n.gau...@gmail.com wrote: DHH just tweeted saying that the domain is back up. Waiting for all the DNS servers to cache it. And the domain is registered for 10 years. So there you go Amala. Happy now :) On Wed, Apr 21, 2010

[Rails] Re: This works, but it can't be best practice. Advice?

2010-04-21 Thread paron
Added this to Project model: def self.find_in_funding_sources(f_s) project_ids = f_s.reduce([]){|items, funding| items.push(funding.project_id)} projects = Project.find(:all, :conditions=[id IN (?), project_ids.uniq]) return projects end now the controller looks better: . . .

Re: [Rails] Re: Best practice around putting rails database info into git

2010-04-21 Thread Rob Biedenharn
On Apr 21, 2010, at 3:12 AM, Matt wrote: On Apr 20, 9:25 am, Pito Salas li...@ruby-forum.com wrote: This maybe too vague a question, but I wonder if there's some wisdom out there for me to tap... Sometimes when I get ready to commit, git says that db/schema.rb has changed. This is weird,

[Rails] Flattening 1:1 models

2010-04-21 Thread Thomas Allen
Is there a simple way to flatten 1:1 models so that the methods in one are accessible from another? This attempt results in a stack depth exception for any call to one of the explicitly defined methods: class User ActiveRecord::Base has_one :contact Contact.column_names.each do |col|

[Rails] Re: Caching of data on server?

2010-04-21 Thread Sijo k g
Hi Pieter Is it possible to create variables in the rails environment that persist globally - not as sessions - that would be too much porting of information forwards and back. This is possible by global variables in ruby (variables starts with @@ ) In any case the data needs to be

[Rails] Radio buttons and :onchange

2010-04-21 Thread Shandy Nantz
Hi all, I have three radio buttons that when clicked are supposed to show a particular div and hide other divs, pretty straight forward. But what I have noticed is that while the code works perfectly in Chrome and Firefox it breaks down in IE 7 8. Here is the code: %= radio_button_tag( :synch,

[Rails] Re: Conditionally adding a link to a form -- how?

2010-04-21 Thread Viorel
Bob, I don't understand, a variable @show_new_expense_page set in the controller will be available in the view. Colin Set where in the controller? In a :before_filter or in show? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

[Rails] SMS service

2010-04-21 Thread Northband
What's a good SMS service to use? I want to start sending messages from my apps via SMS. Thanks! -- 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 unsubscribe from

Re: [Rails] Radio buttons and :onchange

2010-04-21 Thread Colin Law
On 21 April 2010 17:12, Shandy Nantz li...@ruby-forum.com wrote: Hi all, I have three radio buttons that when clicked are supposed to show a particular div and hide other divs, pretty straight forward. But what I have noticed is that while the code works perfectly in Chrome and Firefox it

[Rails] Re: .each do iteration question

2010-04-21 Thread Sijo k g
Hi I got a simple iteration going on % @user.sender.each do |sender| % ... % end % Can I fetch and display for example only 2 items from my database insted of all 4 of them ? in controller @sender = @user.sender.find(:all,:limit = 2) in view % @sender.each do |s| % Sijo -- Posted

Re: [Rails] Re: Conditionally adding a link to a form -- how?

2010-04-21 Thread Colin Law
On 21 April 2010 17:17, Viorel viorelvl...@gmail.com wrote: Bob, I don't understand, a variable @show_new_expense_page set in the controller will be available in the view. Colin Set where in the controller? In a :before_filter or in show? It doesn't matter, either will do. Assuming that

Re: [Rails] Re: Anyone know of a Rails POS (point-of-sale) app?

2010-04-21 Thread Trausti Thor Johannsson
Potion Factory has a free web store made with rails, open source that connects to Paypal. http://www.potionfactory.com/free/ Trausti On Wed, Apr 21, 2010 at 4:18 PM, agung sukariman putra agungsukari...@gmail.com wrote: its that true  brother ? amazing,.. i'll check soon.. -- You received

[Rails] Re: .each do iteration question

2010-04-21 Thread Ar Chron
Babos Catalin wrote: I got a simple iteration going on % @user.sender.each do |sender| % ... % end % Can I fetch and display for example only 2 items from my database insted of all 4 of them ? Is there a better way to do this ? I could use will_paginate on the iteration (per_page =

[Rails] Re: problem with partial rendering for groups of objects

2010-04-21 Thread Ar Chron
Adler Santos wrote: Errata: Replace % form_remote_tag :url = {:action = next, :remaining = @everything} do % with % form_remote_tag :url = {:action = next, :remaining = @remaining} do %. Somewhere you need to keep track of which iteration of Next you are on in the view - perhaps a hidden

[Rails] Re: tips on how to write a controller test for models associ

2010-04-21 Thread Michal Burak
Kura Monni wrote: current_user is defined in the ApplicationController class and it's set as a helper_method, but apparently it's still not visible in the Webrat steps. Check this out http://programmers-blog.com/2010/04/21/cucumber-vs-webrat-vs-current_user-from-authenticatedsystem PS.

[Rails] refactoring question

2010-04-21 Thread Ichiro Saga
Hi, guys. I changed some columns types to decimal in database, but the code is not DIY. Any thoughts on refactoring the following code? change_table :accounts do |t| t.change :check_amount, :decimal, :precision=6, :scale=2, :default=0 t.change :cash_amount, :decimal, :precision=6, :scale=2,

[Rails] Re: Radio buttons and :onchange

2010-04-21 Thread Shandy Nantz
Colin Law wrote: On 21 April 2010 17:12, Shandy Nantz li...@ruby-forum.com wrote: previous div is show from the unheard click. Really I'm just wondering if anybody has encountered a similar problem and how they fixed it if they have. I have been looking at mis-matched tags with no

Re: [Rails] refactoring question

2010-04-21 Thread Philip Hallstrom
On Apr 21, 2010, at 10:32 AM, Ichiro Saga wrote: Hi, guys. I changed some columns types to decimal in database, but the code is not DIY. Any thoughts on refactoring the following code? change_table :accounts do |t| t .change :check_amount, :decimal, :precision=6, :scale=2, :default=0

Re: [Rails] refactoring question

2010-04-21 Thread Philip Hallstrom
On Apr 21, 2010, at 10:56 AM, Philip Hallstrom wrote: On Apr 21, 2010, at 10:32 AM, Ichiro Saga wrote: Hi, guys. I changed some columns types to decimal in database, but the code is not DIY. Any thoughts on refactoring the following code? change_table :accounts do |t| t .change

[Rails] Re: Flattening 1:1 models

2010-04-21 Thread Robert Walker
Thomas Allen wrote: Is there a simple way to flatten 1:1 models so that the methods in one are accessible from another? This attempt results in a stack depth exception for any call to one of the explicitly defined methods: If you wanted all the attributes on one model, why the heck did you

[Rails] Using AR.connection.execute(sql) -- messing with my string?

2010-04-21 Thread Fearless Fool
Does ActiveRecord.connection.execute(string) perform any modifications on the given string? If so, what quoting do I need to add? Here's why: I'm trying to use execute(string) to load a stored procedure. I can hand-load the procedure without error (i.e. via dbconsole), but when I call the

[Rails] Re: refactoring question

2010-04-21 Thread Ichiro Saga
Philip Hallstrom wrote: On Apr 21, 2010, at 10:56 AM, Philip Hallstrom wrote: :check_amount, :decimal, :precision=6, :scale=2, :default=0 end change_table :accounts do |t| [:check_amount, :cache_amount, :change_amount, ..., :total].each do |c| t.change :c, :decimal, :precision =

[Rails] Re: Ruby existing database

2010-04-21 Thread Will Raffaele
Yes, I have installed Rails, as well as oracle_enhanced adapter and oci8 installed. I found an interesting link about using legacy databases: http://www.slideshare.net/napcs/rails-and-legacy-databases-railsconf-2009 I did: rails --database=oracle ora_t1 I took the advice of Craig White and

[Rails] Autoloading not working when using rake task

2010-04-21 Thread Dmitry Polushkin
Hi, I have a problem when I'm doing rake tasks. This behavior happens only on one machine, on another three ones all works fine (three is on ubuntu, problem one is under debian); totally identical environment (I guess). I'm using translator gem, loading through config.gem in environment.rb file.

[Rails] dynamic :conditions for has_many?

2010-04-21 Thread DJ Cole
In the setup of class Group ActiveRecord::Base has_many users :through =user_groups end class User .. ... end for admin like behavior (i.e. we want to see any/all users associated with this group), this is enough. However, in other cases, I want something like class Group

[Rails] Accessing the router from a helper

2010-04-21 Thread Thomas Allen
I find manually accessing the router to be quite ugly below. Is there a more direct way to access it? module ApplicationHelper def menu_item text, url = nil routes = ActionController::Routing::Routes url = if url if url.is_a? String url else

[Rails] Re: slow tests on large rails app

2010-04-21 Thread Nick Gauthier
Check out this (my) presentation: http://bit.ly/grease-your-suite-html arrow keys navigate. -- 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

Re: [Rails] Accessing the router from a helper

2010-04-21 Thread Michael Pavling
On 21 April 2010 20:36, Thomas Allen thomasmal...@gmail.com wrote:    active = request.request_uri == url Would using url_for() not save you a lot of hassle generating that url? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

  1   2   >