Re: [Rails] Paginator

2010-02-01 Thread Conrad Taylor
On Sun, Jan 31, 2010 at 1:12 PM, Manish Belsare li...@ruby-forum.comwrote: hey i m getting an error wen i do da paginating stuff..can u help meh? n it says ActionController does not contain 'super' method.. bt books say its valid..y? Error: uninitialized constant

Re: [Rails] Re: amazon s3 rails file download issue

2010-02-01 Thread Curtis Schofield
also are you using http://amazon.rubyforge.org/ ? the examples that it presents look similar to yours. On Sun, Jan 31, 2010 at 5:07 PM, Curtis Schofield curtis.schofi...@gmail.com wrote: Verify it the file is ok first by writing to the filesystem. You may need to attempt to isolate the

[Rails] Rails and Merb session key and secret

2010-02-01 Thread NY
Hi, I have two apps, one in Rails, and one in Merb. Both use cookie based session store, and are in the same domain. I set the session key and secret to be exactly the same in both apps, but they don't seem to get the session data of each other. When I try to print the cookies in each of them, I

[Rails] [JOBS] Entry-to-mid level Rails developer wanted in Adelaide or Sydney, Australia!

2010-02-01 Thread Sebastian von Conrad
Hi, My name is Sebastian von Conrad and I'm not a recruiter; I'm a software developer with e-channel search, an industry leading search engine marketing agency with offices in Adelaide and Sydney. We've been in business for over 10 years and was recently named as one of Deloitte Technology Fast

[Rails] Re: Rails and Merb session key and secret

2010-02-01 Thread Frederick Cheung
On Jan 31, 9:51 pm, NY yan@gmail.com wrote: Hi, I have two apps, one in Rails, and one in Merb. Both use cookie based session store, and are in the same domain. I set the session key and secret to be exactly the same in both apps, but they don't seem to get the session data of each

[Rails] Installing existing project as plugin

2010-02-01 Thread rubybox
Dear Everyone, I have 1 opensource project im very interested in. I would like to install this project as a plugin since it does not support a /theme folder to override the app views, js, stylesheets, etc. And this option won't be available since it has no priority for them. Im to new to ruby to

[Rails] Re: ActionMailer attaching generated files

2010-02-01 Thread Frederick Cheung
On Jan 31, 4:48 pm, Ryan Abbott abbot...@gmail.com wrote: I have a script that is running as a runner script, its job is to find reports that have recently been published and send emails to the users notifying them of the reports. The reports are available online, but are also available via

[Rails] Re: Which version of RoR is covered in the O Rielly Book - RoR Up Running

2010-02-01 Thread Rails List
Naveen Dhanuka wrote: Hi, I found it difficult to work according to this book with the latest RoR release. Please guide as to which RoR release to use. Thanks... Best Wishes, Naveen Dhanuka. Rails 2.2.2 should work ok. -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] populate dropdown

2010-02-01 Thread M I R
Hi, I am new for RoR i am using f.select for dropdown and want to populate it from database table i have a function in cities model which retrieve all cities and i am doing the follwoing to populate the dropdown f.select :city_id , @cities but it display a strange output with some # etc how i will

[Rails] custom query

2010-02-01 Thread M I R
Hi, i want to select only product id and product name from a table how will i manage please help -- 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

[Rails] Re: populate dropdown

2010-02-01 Thread Rails List
M I R wrote: Hi, I am new for RoR i am using f.select for dropdown and want to populate it from database table i have a function in cities model which retrieve all cities and i am doing the follwoing to populate the dropdown f.select :city_id , @cities but it display a strange output with

[Rails] Re: custom query

2010-02-01 Thread Rails List
M I R wrote: Hi, i want to select only product id and product name from a table how will i manage please help Use find_by_sql(SQL statement) or use find_by_product_id_and_product_name... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Re: Embedding New Line Character in XML Spreadsheet (Excel)

2010-02-01 Thread Rails List
did you try 10.chr -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] set_table_name not working in 2.3.5

2010-02-01 Thread Gigg
I am new to rails and developed a simple task in an app that runs every while using crontab. Under previous versions of rails it worked fine. But, I have upgraded the server, installed rails 2.3.5 as per rubygems latest and it now breaks the task. When I run the task I get this error:

[Rails] :include question

2010-02-01 Thread Alex Shkolnikov
Hello all! Here is the gist with my problem: http://gist.github.com/291533 I need to get all records with one query. Is it possible? 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

[Rails] Re: set_table_name not working in 2.3.5

2010-02-01 Thread Frederick Cheung
On Feb 1, 8:50 am, Gigg gra...@mrit.co.za wrote: I am new to rails and developed a simple task in an app that runs every while using crontab. Under previous versions of rails it worked fine. But, I have upgraded the server, installed rails 2.3.5 as per rubygems latest and it now breaks the

[Rails] Re: jQuery Rails installation

2010-02-01 Thread Rails List
Ralph Shnelvar wrote: I'm missing something basic ... How does one install jQuery in RoR? Use the following line in your layout * %= javascript_include_tag jquery 1.2.3.4 % *

Re: [Rails] Re: custom query

2010-02-01 Thread Rimantas Liubertas
Use find_by_sql(SQL statement) You can also pass :select option to your find e.g.: Product.find :all, :select=id, name Regards, Rimantas -- http://rimantas.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: :include question

2010-02-01 Thread Rails List
Alex Shkolnikov wrote: Hello all! Here is the gist with my problem: http://gist.github.com/291533 I need to get all records with one query. Is it possible? Thanks you need to provide little more info. Are they separate models/entities ( individual tables) or an STI - single table

[Rails] Payroll cum HR management application

2010-02-01 Thread Tom Mac
Hi Could anyone please suggest a good Payroll cum HR management open source rails application? Thanks Tom -- 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] Records monthwise ?

2010-02-01 Thread Hemant Bhargava
Hi Champs, I hope this is not a newbie question.:) I have an leave table with columns start_date and end_date. Employees can apply leave for any date. Now i want to display the number of days of leave he had taken in a year.. I want it to be displayed like this:- Jan - 1 Feb - 10 Mar - 11 ..

[Rails] Re: ror developers

2010-02-01 Thread Rails List
Sns Sem wrote: Ruby on Rails or RoR, is an open source web application framework for the Ruby programming language. We build quality Ruby On Rails web applications for start-ups and established businesses since early 2006. We focus on the core idea, perfect the interface, suggest innovative

[Rails] Problem in Routes

2010-02-01 Thread Charanya Nagarajan
Hi All I had been using Rails 2.1.2 and in routes.rb i had a route defined like map.namespace :mysite do |mysite| mysite.questions '/questions.:format', :controller = 'mysite_questions', :action = 'index' end And now I have updated my rails version Now I get an error like this. Rails

[Rails] Re: :include question

2010-02-01 Thread Alex Shkolnikov
they are individual tables, not sti On Feb 1, 12:43 pm, Rails List li...@ruby-forum.com wrote: Alex Shkolnikov wrote: Hello all! Here is the gist with my problem: http://gist.github.com/291533 I need to get all records with one query. Is it possible? Thanks you need to provide little

[Rails] Re: Problem in Routes

2010-02-01 Thread Rails List
Charanya Nagarajan wrote: Hi All I had been using Rails 2.1.2 and in routes.rb i had a route defined like map.namespace :mysite do |mysite| mysite.questions '/questions.:format', :controller = 'mysite_questions', :action = 'index' end And now I have updated my rails version

[Rails] Re: Re: cucumber vs. RSpec

2010-02-01 Thread Jon Cox
Ray K. wrote: There are the bddcasts: www.bddcasts.com They do cost money, but they're worth it, so is the rspec book. A word of advice: Learning RoR at the same time with Cucumber and RSpec will require you to fight a very steep learning curve. Very often you will neither know how to

[Rails] Re: :include question

2010-02-01 Thread Frederick Cheung
On Feb 1, 8:55 am, Alex Shkolnikov alex.shkolni...@gmail.com wrote: Hello all! Here is the gist with my problem:http://gist.github.com/291533 I need to get all records with one query. Is it possible? Thanks I wrote up some examples for the syntax for :include / :joins a little while ago:

[Rails] Active scaffold multiple edit links

2010-02-01 Thread beny 18241
Hi, Anybody knows how to put multiple edit fields into active scaffold? I'mean exactly 2 edit fields where first update 1'st column and second one 2'nd column ?? Regards -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Suggestion: Merging Rails application templates with generator functionality

2010-02-01 Thread Kristian
Been working a bit lately on implementing Rails app. templates and generators. It is clear there is a lot of overlap and that features from generators could be used in app. templates and vice versa. I will try to port some of the generator features such as the template function (executing an .erb

[Rails] Re: :include question

2010-02-01 Thread Alex Shkolnikov
Thanks a lot! On Feb 1, 1:47 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 1, 8:55 am, Alex Shkolnikov alex.shkolni...@gmail.com wrote: Hello all! Here is the gist with my problem:http://gist.github.com/291533 I need to get all records with one query. Is it possible?

[Rails] Re: Problem in Routes

2010-02-01 Thread Charanya Nagarajan
Thanks For the help Kannan. But I realised that,I get this error,only when I use this type of route mysite.search_questions '/questions/search.:format/:q', :controller = 'mysite_questions', :action = 'search' This works perfectly fine in the previous old version of rails not with the newer

[Rails] Re: Best way to connect various applications?

2010-02-01 Thread Heinz Strunk
Alright, thanks to all of you. I'll give it a shot. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this

[Rails] Re: populate dropdown

2010-02-01 Thread M I R
its ok for now, but when i go to edit page how will i populate the dropdown while the selected option will be the one coming from database suppose i have 3 cities ID City 1. London 2. Bristol 3. Cambridge when i was adding record i select Bristol with id 2 now when i go to

[Rails] Re: Best way to connect various applications?

2010-02-01 Thread Kristian
You could also use Rails Engines. This is a feature of Rails 2.3+ which enables mounting of several apps in one Rails application configuration. Ryanb did a screencast on it. Rails 3 also support mounting multiple apps in the Rack. An other idea is to port your models/database to Mongo DB

[Rails] Re: Best way to connect various applications?

2010-02-01 Thread Marnen Laibow-Koser
Kristian wrote: You could also use Rails Engines. This is a feature of Rails 2.3+ which enables mounting of several apps in one Rails application configuration. Oh, yeah. I always forget about Engines. Ryanb did a screencast on it. Rails 3 also support mounting multiple apps in the Rack.

[Rails] Re: Saving to the DB uses a lot of RAM?

2010-02-01 Thread Marnen Laibow-Koser
pepe wrote: I am sorry but I don't have an answer about the RAM question. However I would like to answer Marnen�s comment. While I agree that letting the DB do the work for mass record processing should be the best and most efficient way to go by reading the OP one cannot assume that is the

[Rails] Re: View Helper Scope

2010-02-01 Thread Marnen Laibow-Koser
Michael Schuerig wrote: On Sunday 31 January 2010, Marnen Laibow-Koser wrote: If you only include specific helper modules, you can have multiple methods with the same name, but different implementations. This can be useful in order to avoid inadvertently stepping on another method with

[Rails] Re: cucumber vs. RSpec

2010-02-01 Thread Marnen Laibow-Koser
pepe wrote: Sorry, one more thing. What could be the best sources of information to learn how to use both tools? I learn much better with examples. I have searched for the RSpec book, which for what I've read has both subjects in it, but it seems it's not yet available. I learned both

[Rails] Re: Re: cucumber vs. RSpec

2010-02-01 Thread Marnen Laibow-Koser
Ray K. wrote: There are the bddcasts: www.bddcasts.com They do cost money, but they're worth it, so is the rspec book. A word of advice: Learning RoR at the same time with Cucumber and RSpec will require you to fight a very steep learning curve. Very often you will neither know how to

[Rails] Re: Records monthwise ?

2010-02-01 Thread Sharagoz --
Hi Champs, I hope this is not a newbie question.:) Its not as bad as last time, but you may still get yelled at, especially since you're posting on a monday Leave.sum(DAY(end_date) - DAY(start_date) + 1, :group = MONTH(start_date), :conditions = [YEAR(start_date)=?,the_year_you_want]) This

[Rails] Re: populate dropdown

2010-02-01 Thread Sharagoz --
M I R wrote: i was expecting some magic here The edit page should show the correct selection by magic if the form is correct. Could you show us the edit form that isnt working as expected? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Keeping a running count of user input

2010-02-01 Thread Dan Ci
(Start disclaimer) New to ruby, new to rails, haven't programmed since high school. (End disclaimer) I am working on a personal project which I can use to track my golf scores and progress but am having difficult keeping a running count of the amount of holes played. The app should work like

[Rails] Re: Keeping a running count of user input

2010-02-01 Thread Sharagoz --
You can store it in a session variable to keep track across requests session[:hole_number] = hole_number -- 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] Use establish_connection

2010-02-01 Thread Tushar Gandhi
Hi, I have 2 database for my application development1 and development2. My default database is development1. But I have to update the contacts table which is in davelopment2. So I know that I have to use the establish_connection to establish a connection with the development2. I am doing like

[Rails] Re: View Helper Scope

2010-02-01 Thread Michael Schuerig
On Monday 01 February 2010, Marnen Laibow-Koser wrote: Michael Schuerig wrote: On Sunday 31 January 2010, Marnen Laibow-Koser wrote: If you only include specific helper modules, you can have multiple methods with the same name, but different implementations. This can be useful in order

[Rails] Re: Use establish_connection

2010-02-01 Thread Sharagoz --
If you are always going to CRUD contacts in development2, then you can set the connection on the model: in contact.rb class Contact ActiveRecord::Base establish_connection(:development2) end in database.yml: development2: adapter: mysql host: localhost database: railsdatabase

[Rails] Problems with system(...) method in Rails

2010-02-01 Thread Christoph Jasinski
Hi there, since two days or so my application doesn't seem to execute the system method. I use it for generating thumbnails like: def create_thumb(field,image_name) thumb_name = ... path = ... # call ImageMagick method from console command = convert -thumbnail

[Rails] Re: Problems with system(...) method in Rails

2010-02-01 Thread Frederick Cheung
On Feb 1, 2:04 pm, Christoph Jasinski christoph.jasin...@googlemail.com wrote: The output to the logger is correct. When  I execute the command string in the console (rails console or linux console) it works. But it seems not to work inside my Rails controller, which is really weird. It

[Rails] Re: Records monthwise ?

2010-02-01 Thread Hemant Bhargava
Sharagoz -- wrote: I think i am just near to resolve it.. Got the logic to it.. I'll tell you how i am doing it. --- @month_leaves = Array.new for i in 1..12 month = i year = Date.today.year start_date =

Re: [Rails] Re: Problems with system(...) method in Rails

2010-02-01 Thread Christoph Jasinski
Thank Fred, didn't know about that possibility. But unfortunately the result is 0. So it's really bad magic to me. Am trying to set the command path manually. Maybe that works. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

Re: [Rails] Suggestion: Merging Rails application templates with generator functionality

2010-02-01 Thread Rick DeNatale
On Mon, Feb 1, 2010 at 6:11 AM, Kristian kmand...@gmail.com wrote: Been working a bit lately on implementing Rails app. templates and generators. It is clear there is a lot of overlap and that features from generators could be used in app. templates and vice versa. I will try to port some of

[Rails] Re: Keeping a running count of user input

2010-02-01 Thread Marnen Laibow-Koser
Dan Ci wrote: (Start disclaimer) New to ruby, new to rails, haven't programmed since high school. (End disclaimer) I am working on a personal project which I can use to track my golf scores and progress but am having difficult keeping a running count of the amount of holes played. The

[Rails] Re: Which version of RoR is covered in the O Rielly Book - R

2010-02-01 Thread Marnen Laibow-Koser
Rails List wrote: Naveen Dhanuka wrote: Hi, I found it difficult to work according to this book with the latest RoR release. Please guide as to which RoR release to use. Thanks... Best Wishes, Naveen Dhanuka. Rails 2.2.2 should work ok. No. Use the latest release (2.3.5).

Re: [Rails] Re: Problems with system(...) method in Rails

2010-02-01 Thread Christoph Jasinski
Seems that I had to write the full path to convert. That might be cause by a problem I had with rmagick and had to install ImageMagick in two different ways (from source and from rpm) at the same time. It had screwed the path to convert. But somehow the rails console and linux console had no

Re: [Rails] Re: View Helper Scope

2010-02-01 Thread Rick DeNatale
On Mon, Feb 1, 2010 at 8:45 AM, Michael Schuerig mich...@schuerig.de wrote: On Monday 01 February 2010, Marnen Laibow-Koser wrote: Michael Schuerig wrote: On Sunday 31 January 2010, Marnen Laibow-Koser wrote: If you only include specific helper modules, you can have multiple methods with

[Rails] Re: has_many, through with multiple nested models?

2010-02-01 Thread Sharagoz --
Since topic, comment and reply are sharing a lot of the same fields as well as some logic, I reckon I'd make a superclass here for the three of them. Topic, comment and reply are basically the same thing, right? A post. By using a superclass you can base logic like finding which forums a user

[Rails] Re: View Helper Scope

2010-02-01 Thread Frederick Cheung
On Feb 1, 3:11 pm, Rick DeNatale rick.denat...@gmail.com wrote: No, helper methods are indeed methods.  They are defined in modules, and those modules are included into views by the controllers, and can be explicitly included by other classes. Aren't all 'functions' technically methods in ruby

[Rails] Developer Wanted

2010-02-01 Thread dwiggin...@vestadvertising.com
My agency is looking for a Ruby on Rails developer in the Louisville, KY area. Any input would be appreciated. -- 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

Re: [Rails] Re: Problems with system(...) method in Rails

2010-02-01 Thread Frederick Cheung
On 1 Feb 2010, at 14:49, Christoph Jasinski wrote: Seems that I had to write the full path to convert. That might be cause by a problem I had with rmagick and had to install ImageMagick in two different ways (from source and from rpm) at the same time. It had screwed the path to convert.

Re: [Rails] Re: View Helper Scope

2010-02-01 Thread Rick DeNatale
On Mon, Feb 1, 2010 at 10:20 AM, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 1, 3:11 pm, Rick DeNatale rick.denat...@gmail.com wrote: No, helper methods are indeed methods.  They are defined in modules, and those modules are included into views by the controllers, and can be

[Rails] Getting Started needs Rails 3.0, but gem install rails installs Rails 2.3.8

2010-02-01 Thread fearless_fool
As of this writing: The Getting Started guide (http://guides.rails.info/ getting_started.html) was recently re-written to reflect recent features in Rails 3.0. But the instructions it gives for downloading rails in section 3.1 (gem install rails) fetches rails 2.3.8, which won't work for the

[Rails] Re: Getting Started needs Rails 3.0, but gem install rails installs Rails 2.3.8

2010-02-01 Thread Frederick Cheung
On Feb 1, 4:34 pm, fearless_fool rdp...@gmail.com wrote: - The Guide should explain how to download Rails 3.0 (iff it is stable) - The Guide should offer a pointer to Rails 2.3.8 compatible examples - The Guide should be rolled back to Rails 2.3.8 until Rails 3.0 is the main version On

[Rails] Deploying issues with plesk.. usergroups, permissions and mysql database creation

2010-02-01 Thread rubybox
I have several ruby newbie problems with my deployment 1) First issue.. user rights and group permissions with ruby enterprise using PLESK To deploy i did create a git bare repo on my server inside /var/git/ myapp.git git remote add deployserver ssh://myserver.com/var/git/myapp.git For

Re: [Rails] Action path - syntax error, unexpected tIDENTIFIER, expecting ')'

2010-02-01 Thread vihrao
Rob Biedenharn-2 wrote: On Jan 31, 2010, at 3:50 PM, vihrao wrote: I tried %= link_to 'Login', login_user_path(user) % it did not work I tried: %= link_to 'Login', :controller = 'user', :action = 'login' % that worked. So I still don't get how the REST Path is defined and can

[Rails] Re: Keeping a running count of user input

2010-02-01 Thread Ar Chron
Marnen Laibow-Koser wrote: Why not just provide a form for all 18 holes? Holy verisimilitude Batman!!! You mean a web page that looks like 99% of the golf score cards in use today? Genius, sheer genius. (no offense intended to anyone, just having fun)... -- Posted via

[Rails] Re: Deploying issues with plesk.. usergroups, permissions and mysql database creation

2010-02-01 Thread rubybox
Correction on above, I login as git user for my ssh Forgot to add that sorry about that. It all works so if syntax above is not correct its just typo. I think i Need Cap to do these more advanched things like changing user permissions. Problem is I could not get it up and running so if anyone

[Rails] Re: View Helper Scope

2010-02-01 Thread Marnen Laibow-Koser
Michael Schuerig wrote: [...] What's the point of helper polymorphism? I'm having trouble coming up with a good use case for it. format_value, cancel_link are just two examples where generic names are perfectly understandable within a context, although they may need to do different things

[Rails] Re: Deploying issues with plesk.. usergroups, permissions and mysql database creation

2010-02-01 Thread Gary Taylor
I use git with my own repo's, along with Capistrano and passenger. I simply have a special 'vhost.conf' for plesk (you can do this in .htaccess but I don't like them) and I then create the 'apps' directory on the server manually with the correct permissions and then fire off capistrano to do the

[Rails] Re: Keeping a running count of user input

2010-02-01 Thread Marnen Laibow-Koser
Ar Chron wrote: Marnen Laibow-Koser wrote: Why not just provide a form for all 18 holes? Holy verisimilitude Batman!!! You mean a web page that looks like 99% of the golf score cards in use today? Genius, sheer genius. I am always happy to impress. :D (no offense intended to

[Rails] Re: Deploying issues with plesk.. usergroups, permissions and mysql database creation

2010-02-01 Thread Marnen Laibow-Koser
rubybox wrote: Correction on above, I login as git user for my ssh Forgot to add that sorry about that. It all works so if syntax above is not correct its just typo. I think i Need Cap to do these more advanched things like changing user permissions. Problem is I could not get it up and

Re: [Rails] Action path - syntax error, unexpected tIDENTIFIER, expecting ')'

2010-02-01 Thread Rob Biedenharn
On Feb 1, 2010, at 12:19 PM, vihrao wrote: Rob Biedenharn-2 wrote: On Jan 31, 2010, at 3:50 PM, vihrao wrote: I tried %= link_to 'Login', login_user_path(user) % it did not work I tried: %= link_to 'Login', :controller = 'user', :action = 'login' % that worked. So I still don't get how the

[Rails] validating both sides of a has_one relationship breaks pickle/machinist tests

2010-02-01 Thread Doug
A lot has been posted about validation issues with associations, however, I don't see this issue addressed specifically. ex: class Foo has_one :schedule, :dependent = :destroy validates_presence_of :schedule class Schedule belongs_to :foo validates_presence_of :foo_id this creates a

[Rails] Re: validating both sides of a has_one relationship breaks

2010-02-01 Thread Marnen Laibow-Koser
Doug wrote: A lot has been posted about validation issues with associations, however, I don't see this issue addressed specifically. ex: class Foo has_one :schedule, :dependent = :destroy validates_presence_of :schedule class Schedule belongs_to :foo validates_presence_of

[Rails] Re: Getting Started needs Rails 3.0, but gem install rails installs Rails 2.3.8

2010-02-01 Thread Simone R.
Frederick Cheung wrote: - The Guide should explain how to download Rails 3.0 (iff it is stable) I used this link http://oscardelben.com/articles/2009/12/06/how-to-test-rails-3.html for getting a Rails3 running enviroment. Simone -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] Re: validating both sides of a has_one relationship breaks

2010-02-01 Thread Doug
thanks for the quick responsesome follow up questions: 1. why get rid of the validation on the has_one side rather than the belongs_to? 2. why do you call it unnecessary? the requirement that Foo has a schedule (in my example) and vice-versa seems reasonable. However, given the above, I

[Rails] find_each leaks (a lot)?

2010-02-01 Thread PierreW
Hi guys, I need to load a big amount of records from a table (around 2). So I am using find_each. In the RDoc it says: When processing large numbers of records, it‘s often a good idea to do so in batches to prevent memory ballooning. I am not sure I get it though, indeed: 1- If I do:

[Rails] require gem only for specific controller.

2010-02-01 Thread Great John
Hello, Is there a way to require a gem only when specific controller is accessed. I have one plugng that doesn't like co-existing with a gem(active scaffold and will_paginate). I have two controllers that use will_paginate, but no active scaffold and I thought of requiring that gem only for those

[Rails] Re: Getting Started needs Rails 3.0, but gem install rails installs Rails 2.3.8

2010-02-01 Thread josh
Anyone else getting an error when running the rake install task? j...@jr-desktop:~/dev/rails$ sudo rake --trace install (in /home/jr/dev/rails) ** Invoke install (first_time) ** Invoke gem (first_time) ** Invoke pkg/rails-3.0.pre.gem (first_time, not_needed) ** Invoke pkg (first_time, not_needed)

[Rails] Re: validating both sides of a has_one relationship breaks

2010-02-01 Thread Marnen Laibow-Koser
Doug wrote: thanks for the quick responsesome follow up questions: 1. why get rid of the validation on the has_one side rather than the belongs_to? On the belongs_to side, you can check for a foreign key within the object, which is straightforward. There's no simple way to do it from

Re: [Rails] Action path - syntax error, unexpected tIDENTIFIER, expecting ')'

2010-02-01 Thread vihrao
Thank you. I was confused between named routes and RESTful routes Rob Biedenharn-2 wrote: On Feb 1, 2010, at 12:19 PM, vihrao wrote: Rob Biedenharn-2 wrote: On Jan 31, 2010, at 3:50 PM, vihrao wrote: I tried %= link_to 'Login', login_user_path(user) % it did not work I tried: %=

[Rails] Re: Best way to connect various applications?

2010-02-01 Thread Heinz Strunk
Rails Engines sounds indeed very interesting. I'll check the screencast. Thanks! -- 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: View Helper Scope

2010-02-01 Thread Michael Schuerig
On Monday 01 February 2010, Marnen Laibow-Koser wrote: Michael Schuerig wrote: [...] What's the point of helper polymorphism? I'm having trouble coming up with a good use case for it. format_value, cancel_link are just two examples where generic names are perfectly understandable

[Rails] Re: View Helper Scope

2010-02-01 Thread Marnen Laibow-Koser
Michael Schuerig wrote: On Monday 01 February 2010, Marnen Laibow-Koser wrote: Does cancel_link need to do different things depending on context? If so, what? Let's say that, in an edit view, you want cancel_link to generate a link back to the corresponding list view. I think you could

[Rails] Query multiple models/tables for an Overview page

2010-02-01 Thread Seirie
Hey guys. I want to create a overview page for my application that contains the latest activity on the site, from a few different sources. Lets say we have messages, comments, files and tasks (much like Basecamp, if you've ever used it) and you want to display them all in one big list, intermixed,

[Rails] Re: Query multiple models/tables for an Overview page

2010-02-01 Thread Marnen Laibow-Koser
Seirie wrote: Hey guys. I want to create a overview page for my application that contains the latest activity on the site, from a few different sources. Lets say we have messages, comments, files and tasks (much like Basecamp, if you've ever used it) and you want to display them all in one

[Rails] Needed: Designer comfortable with Rails

2010-02-01 Thread Mark Dodwell
I'm a designer and Rails developer, I'm looking for a designer who's comfortable working with Ruby on Rails projects to make changes for one of my existing clients (based in Oxford). The site is running on a bespoke CMS -- similar to Radiant CMS. I'm currently engaged in a big 6 month project, so

[Rails] Re: Saving to the DB uses a lot of RAM?

2010-02-01 Thread pepe
On Feb 1, 7:53 am, Marnen Laibow-Koser li...@ruby-forum.com wrote: pepe wrote: I am sorry but I don't have an answer about the RAM question. However I would like to answer Marnen s comment. While I agree that letting the DB do the work for mass record processing should be the best and

[Rails] Create form in another Controller's show view

2010-02-01 Thread admanb
This seems like a really obvious question, but I'm blanking on the solution. I have a simple post/comments relationship that fits the basic blog model. That means that the form to create a new comment is in the show action in the Posts controller, but the form links to the create action in the

[Rails] Find_by

2010-02-01 Thread RubyonRails_newbie
Hi All, I'm looking to improve finding friends on my site, by adding a ''suggestion'' page/area. BAsically, a query should be run against a logged in user and find other people from the same town/location. Or that share a similar hobby etc. I have a controller and an index page i want to update

[Rails] Re: cucumber vs. RSpec

2010-02-01 Thread milandobrota
Learn it in parallel. Any resource will work just fine, you will learn the basics easily. -- 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

[Rails] Re: Create form in another Controller's show view

2010-02-01 Thread Sharagoz --
The problem is that you cant render another controllers action the traditional way. In the comments controller you have to render :template = 'posts/show' when a comment fails validation. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: Find_by

2010-02-01 Thread milandobrota
I'm not sure I understand your question. Do you need a list of cities near London that you want to search through? Or you have a problem with views? Regards, Milan On Feb 1, 11:30 pm, RubyonRails_newbie craigwest...@googlemail.com wrote: Hi All, I'm looking to improve finding friends on my

[Rails] Re: cucumber vs. RSpec

2010-02-01 Thread pepe
Well, unfortunately untested code is part of reality. Although I have tried to be good and test all I could I have not followed a methodology or tool to get things done right the first time and be more efficient at it and I am sure there are parts of my code that I missed, reason why I am so

[Rails] Re: Query multiple models/tables for an Overview page

2010-02-01 Thread Seirie
Hmm, alright, I suspected that might be the case. Suppose it's not such a big loss. Thanks Marnen! On Feb 1, 5:06 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Seirie wrote: Hey guys. I want to create a overview page for my application that contains the latest activity on the site,

[Rails] sqlite3.dll??

2010-02-01 Thread Afg Afg
I am running windows xp. I also have aptana and mysql installed. The problem is that when i try to go and view my project from browser it says sqlite3.dll was not found, blah blah. I don't sqlite3.dll since i am using mysql for my databases. What can i do to fix this? -- Posted via

[Rails] Re: Saving to the DB uses a lot of RAM?

2010-02-01 Thread Marnen Laibow-Koser
pepe wrote: On Feb 1, 7:53�am, Marnen Laibow-Koser li...@ruby-forum.com wrote: pepe wrote: I am sorry but I don't have an answer about the RAM question. However I would like to answer Marnen s comment. While I agree that letting the DB do the work for mass record processing should be the

[Rails] Re: Create form in another Controller's show view

2010-02-01 Thread admanb
Thank you. :) -- 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

[Rails] Detect change to an associated attribute

2010-02-01 Thread Jerry Franks
Consider these two models: class Article ActiveRecord::Base has_many :posts end class Post ActiveRecord::Base belongs_to :article end The ActiveRecord::Dirty module allows one to detect changes in a model's attribute. In the above example, how does one detect if the number of posts an

[Rails] Re: View Helper Scope

2010-02-01 Thread Michael Schuerig
On Monday 01 February 2010, Marnen Laibow-Koser wrote: These are strictly UI-issues that don't belong in the model. No they're not. I tend to think models should know how to display themselves. Otherwise, you wind up with poor view code like your earlier example and inappropriate

[Rails] Re: Detect change to an associated attribute

2010-02-01 Thread Alpha Blue
Here's an example for you: http://ryandaigle.com/articles/2008/3/31/what-s-new-in-edge-rails-dirty-objects -- 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

  1   2   >