[Rails] Re: Input/output error

2010-05-06 Thread Nitin Mathur
Rick, Can you also please tell me possible causes of Input/Output errors. Sometimes I found that if I leave a space between a function name and the brackets for arguments (e.g. find (:all)). It gives this error. and sometimes if I use stdout, stderr functions in controller or view files it give

[Rails] Re: Input/output error

2010-05-06 Thread Nitin Mathur
Hi Rick, Thanks for reply. Could use of the old version cause this problem? Actually I wanted to use the latest version of Rails but that was not compatible with the ruby installed in my system and I could not figure out which Ruby version was compatible with latest Rails at that time (2.3.4).

[Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Joe
Please note I've also tried this: Tutorial.next_lesson(@tutorial.id, @tutorial.category_id) Which results in some compile errors: wrong number of arguments (2 for 0) I guess this is because my model doesn't take any parameters, and I'm giving it 2... I'll be looking around for how I can make it

[Rails] sorting a listing page

2010-05-06 Thread Tom Mac
Hi I have a list page for users. I am using will_paginate for pagination. So an example is full_name(f_name+l_name) email unit(this an integer colum is user.buildng.unit) Clinton Trone cl...@test.com 2 Evette Pace e...@test.com2 Brett B

Re: [Rails] error message of a child object

2010-05-06 Thread Michael Pavling
On 7 May 2010 00:49, oren wrote: > in my update action of Key, if the key has non-valid value object I > see this error message: > "Translation values is invalid" > > why don't I see:  "already exist in another key" instead? Have a look at this thread from last week, which is the same question.

[Rails] File.read not working properly for .txt file

2010-05-06 Thread Anubhaw Prakash
Hi All, I am trying to read a .txt file through File.read method. It returns value '0004\0004\0007\0005\0005\\0001\0002\0001\000\t\000A\000u'. But when i open the file and save it as save as it returns value for example '\t21554005\abcd\xy\zzz\' which is proper. I am using fedora-11 machine. Th

[Rails] New to web app development -- ROR pros and cons

2010-05-06 Thread Anthony
I am brand new to web application development, and I'm looking for a good web framework to learn in order to build a new web application (sort of a personal task/project management system). I've got some experience with website building, HTML, CSS, and a little javascript. I don't have any experien

Re: [Rails] Re: validation message in other module

2010-05-06 Thread Rahul Mehta
hi fredrick module mean complete scaffold, and validation is not triggering and showing error because this new form is present in other module scaffold other model ... i have one public model and one comment model.. i have putted the comment add form in the public view and want to run the valida

Re: [Rails] Re: Using self. Can you newbify this for me?

2010-05-06 Thread Rick DeNatale
On Thu, May 6, 2010 at 5:15 PM, Michael Pavling wrote: > On 6 May 2010 22:11, Joshua Martin wrote: >> Question: Doesn't Ruby automatically return the object you were last >> operating on? > > not quite. > > it returns the result of the last operation. Actually the value of the last expression.

[Rails] error message of a child object

2010-05-06 Thread oren
class TranslationKey < ActiveRecord::Base has_many :key_values has_many :translation_values, :through => :key_values validates_uniqueness_of :name, :message => "already exist in another key" end class TranslationValue < ActiveRecord::Base has_many :key_values has_many :translation_keys,

[Rails] Sr Ruby on Rails Engineer in Silicon Valley (up to 140K)

2010-05-06 Thread 208317id
Hi there, I am hoping to get the word out about a senior development role in the peninsula with a growing, hot company involved in SAAS technologies . We need someone with multiple years of developing web- based apps and at least 2 solid years of Rails, Ruby & Java. We would love this person to h

Re: [Rails] Re: Controller Tests fail

2010-05-06 Thread Greg Donald
On Thu, May 6, 2010 at 5:04 PM, Marnen Laibow-Koser wrote: > Functional tests and fixtures (which I gather you're using from a later > post) are two Rails features that are best avoided entirely. Page 224 of Agile Web Development with Rails, 3rd Edition by Dave Thomas, DHH, and Sam Ruby seems to

[Rails] Re: Controller Tests fail

2010-05-06 Thread Marnen Laibow-Koser
Graham Farrell wrote: > Hi all, > > I'm hoping someone can help me here I'm trying to carry out functional > testing, Functional tests and fixtures (which I gather you're using from a later post) are two Rails features that are best avoided entirely. Instead of functional tests, use Cucumber fe

Re: [Rails] Re: Which Database to choose when?

2010-05-06 Thread Christoph Jasinski
Thanks Robert. So I'll do the research on my own, now. Chris -- 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 rubyonra

Re: [Rails] Re: Using self. Can you newbify this for me?

2010-05-06 Thread Michael Pavling
On 6 May 2010 22:11, Joshua Martin wrote: > Question: Doesn't Ruby automatically return the object you were last > operating on? not quite. it returns the result of the last operation. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

Re: [Rails] Re: Using self. Can you newbify this for me?

2010-05-06 Thread Joshua Martin
I understand their position, but don't you think it's kinda weird to just leave it like that... No operations or anything.. Ruby is all about readability, and to just type the name of the object without performing any operations on it is not really natural. It's like, what the heck is it doing just

[Rails] Re: new rails project with legacy DB (sort of)

2010-05-06 Thread Marnen Laibow-Koser
agilehack wrote: > that is a great idea and I had that thought. It has several tables > and some of the table many fields so is there an easy way to do that? > Do you think taking a SQL dump of the DB and then copy paste most it > into the migration file and then run rake db:migrate?? No way!

[Rails] ActiveRecord::AdapterNotFound - oci8 problems

2010-05-06 Thread Ybr
I have resolved all the problems with OCI8Errors (you should see http://rubyforge.org/forum/forum.php?thread_id=47776&forum_id=1078 for more information). Now there is connecting to my DBMS without errors :))) OS: Win_XP_home DBMS: Oracle XE 10g Well. When I connect to DBMS by command line, it’s

[Rails] Re: Best HOST and web server

2010-05-06 Thread Marnen Laibow-Koser
David Zhu wrote: > ok I'm still a little bit confused- > > I read some places where they compare passenger vs mongrel/thin > > is that correct? Yes, mostly. > i thought passenger was a tool, not an entire backend > server... > > clarification? You apparently thought wrong: it's a module for

Re: [Rails] Re: Best HOST and web server

2010-05-06 Thread John Adams
Passenger is an apache module (mod_rails). I recommend that you run Passenger if you can, but if you have heavy reliance on mod_rewrite, I seem to remember serious issues running both at the same time. Over here at Twitter we're running Apache and Unicorn, which we've been very happy with so far.

[Rails] Problems using exception_notification 2.3.3.0

2010-05-06 Thread Jarl Friis
Hi. I am using rails 2.3.5 I just installed exception_notification 2.3.3.0 using 'sudo gem install exception_notification' I have add config.gem "exception_notification" in environment.rb and 'include ExceptionNotification::Notifiable' in application_controller.rb Now I am trying it out in deve

[Rails] Ajax In place editor to send modifications

2010-05-06 Thread Anand Ramanathan
Hi, I have a requirement to use an Ajax in place editor on a set of snippets to allow user to modify existing content. Once edited, however, I want the ok button to NOT modify the original snippet, but instead, send the content to another action, which then updates a different object. Currently,

[Rails] Re: NULL value in CSV fixture, howto?

2010-05-06 Thread Robert Walker
Owain wrote: > I am preparing some seed data for a deployment from generated a CSV > file. However, one of the model's columns ( child_id) needs to have a > null value in on a few of the rows where there is no Child instance. > Whatever I have put in there, it seems to just come in as a zero. > >

[Rails] Re: Best HOST and web server

2010-05-06 Thread David Zhu
ok I'm still a little bit confused- I read some places where they compare passenger vs mongrel/thin is that correct? i thought passenger was a tool, not an entire backend server... clarification? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk

[Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Joe
I did try using: "@tutorial.next_lesson" before, however I got this error so figured it must be wrong: undefined method `next_lesson' I don't quite know why it can't find the method since it's obviously in the model... Has anyone got a solution for this? Thanks In Advance, Joe On May 6, 5:30 

[Rails] Which version of rmagicks needs to be installed?

2010-05-06 Thread dare ruby
Dear Friends, Which rmagick and imagemagick version will support in ruby 1.9.1 & rails 3.0.0(beta 3) version in a windows xp machine? Kindly help, Regards, Jose Martin -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby

Re: [Rails] Bundler for Rails 3 Engine

2010-05-06 Thread Jeremy Kemper
On Thu, May 6, 2010 at 8:29 AM, Peter Fitzgibbons wrote: > Hello All, > My google-fu did not find this answer : > How do I configure a Rails-3 Engine so that the engine's Gemfile is > integrated with the parent-Rails-app's bundle? You package your plugin as a gem, then add it as a dependency to y

[Rails] Re: Using self. Can you newbify this for me?

2010-05-06 Thread Joe Smith
Joshua Martin wrote: Also, you should put return li at the end; you don't have to, but it just makes the code easier to read. Oddly most ruby style guides I've seen disagree with this. They recommend using return only if one is returning from the middle of the function. -- You received th

Re: [Rails] Re: Continously running a script

2010-05-06 Thread Michael Pavling
On 6 May 2010 18:51, tashfeen.ekram wrote: > Thanks! > > I can think of a few ways to write a script with a continous loop. > Just wondering though if there is a straight forward way to do it. while true Model.all.each do |record| #... stuff with record end end Writing a continuous loop

[Rails] Re: Continously running a script

2010-05-06 Thread tashfeen.ekram
Thanks! I can think of a few ways to write a script with a continous loop. Just wondering though if there is a straight forward way to do it. The one way I can think of is to have a integer that is the index of the record in the DB and then just reset it when it hits the number of records in the

Re: [Rails] Re: Questioning My Design

2010-05-06 Thread Rob Biedenharn
On May 6, 2010, at 11:04 AM, Dee wrote: Ah ha! That does make sense, Rob! I've had similar problems before but haven't considered additional member functions. You are correct in assuming that I have those associations and named_scopes. The "current crops" is actually a named scope as is past cro

Re: [Rails] Input/output error

2010-05-06 Thread Rick DeNatale
On Thu, May 6, 2010 at 4:44 AM, Nitin Mathur wrote: > Hi > > My application was running fine. All of sudden I started to get an > input/output error in one of the templates. However, error goes away > once I restart the mongrel server but after some time again same error > appears. I am pasting th

[Rails] Re: Git Issue

2010-05-06 Thread Aldric Giacomoni
Jesse wrote: > Hi All, > > This is not specifically a Rails question, but I figure that > someone here might know enough about git to help me. > > Here is the situation. http://groups.google.com/group/git-users ? -- Posted via http://www.ruby-forum.com/. -- You received this message

Re: [Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Michael Pavling
On 6 May 2010 17:23, Joe wrote: > As for acts_as_list, I would prefer not to use it for now and just > keep with using position; However it is something I will be looking at > for future projects.. Why?! acts_as_list uses the position column itself. You can scope it (so you can have a list per ca

Re: [Rails] Validating the presence of foreign keys /associated objects

2010-05-06 Thread Rick DeNatale
On Thu, May 6, 2010 at 10:20 AM, ct9a wrote: > class Fit < ActiveRecord::Base >    belongs_to :Part >    belongs_to :Brand It probably doesn't make a difference, but conventionally the attribute ids should be lowercase belongs_to :part belongs_to :brand > >    validates_presence_of

[Rails] Git Issue

2010-05-06 Thread Jesse
Hi All, This is not specifically a Rails question, but I figure that someone here might know enough about git to help me. Here is the situation. I had set up a private Git Repo server for my companies projects. For testing I did everything as root. Now that I am ready to allow o

[Rails] (SystemStackError) Unit Tests Not working

2010-05-06 Thread Sumeet Panchal
Hi, Please Help, I am trying to run tests on my website but it fails each and every time I think its not even running test. ruby version: ruby 1.8.6 (2008-03-03 patchlevel 114) [x86_64-linux] rails version: Rails 2.3.5 when I did this from console ruby test/units/activity_test.rb it throws thi

[Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Frederick Cheung
On May 6, 5:23 pm, Joe wrote: > When I change it to "Tutorial.next_lesson" it then says: undefined > method `nil_class_path' > > Is this because I have to "pass in the tutorial_id and category_id" or > is it a different problem? > You're probably getting nil_class_path because you are returning

[Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Joe
When I change it to "Tutorial.next_lesson" it then says: undefined method `nil_class_path' Is this because I have to "pass in the tutorial_id and category_id" or is it a different problem? As for acts_as_list, I would prefer not to use it for now and just keep with using position; However it is s

[Rails] Re: Validate depending on action

2010-05-06 Thread Frederick Cheung
On May 6, 2:03 pm, Greg Ma wrote: > Hi, > > Is it possible use validations depending on the action? Sort of - the :if/:unless options to validations are pretty powerful, but it's not quite as simple as saying :action => :blah (apart from anything else the model shouldn't really know anything ab

[Rails] rails running on local host but not showing code

2010-05-06 Thread Lemmy
I am new to using rails with netbeans and i cannot get the localhost to preview my work it says that something went wrong => Booting WEBrick => Rails 2.3.4 application starting on http://0.0.0.0:3000 JRuby limited openssl loaded. gem install jruby-openssl for full support. http://jruby.kenai.com/pa

[Rails] Re: validation message in other module

2010-05-06 Thread Frederick Cheung
On May 6, 12:03 pm, Rahul Mehta wrote: > hii Fredrick,, > > i have setup the in my comment module >    validates_presence_of(:name,:comment) > By module do you mean class ? Is the validation not triggering because a blank name still counts as present? Fred > and what other detail you need , an

Re: [Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Michael Pavling
On 6 May 2010 16:41, Joe wrote: >  def self.next_lesson >        find :all, :conditions => ["position > ? AND category_id  = ?", > @tutorial_id, @category_id], :order => 'position', :limit => 1 >        end > > and then this code in the link: > > <%= link_to 'Next lesson.', @tutorial.next_lesson  

[Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Joe
Thanks so much! It works! However now I'm just trying to get the whole 'next lesson' thing working. I've tried it using this code in the model: def self.next_lesson find :all, :conditions => ["position > ? AND category_id = ?", @tutorial_id, @category_id], :order => 'position', :limit

[Rails] Bundler for Rails 3 Engine

2010-05-06 Thread Peter Fitzgibbons
Hello All, My google-fu did not find this answer : How do I configure a Rails-3 Engine so that the engine's Gemfile is integrated with the parent-Rails-app's bundle? Thanks Peter Fitzgibbons (847) 859-9550 Email: peter.fitzgibb...@gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibb...@g

[Rails] Re: Re: Need help getting environment setup

2010-05-06 Thread Anthony Deaver
Jason White wrote: > I used the setup guide at > http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition > > It got me up and running, maybe you can find a missing step. > > Sent from my iPhone > > On May 5, 20

[Rails] Re: Dynamic Selects - Dynamic View

2010-05-06 Thread KT
Do I need to create another javascript to populate descriptions? I'm stuck... please help! On May 5, 7:49 am, KT wrote: > Thanks and sure thing: > > javascripts controller: > >   def dynamic_products >     @products = Product.find(:all) >   end > > --

[Rails] how to find installed gem is rmagick 2 or rmagick 1?

2010-05-06 Thread dare ruby
Dear Friends, I need to install rmagick2. when i give gem install rmagick, rmagick 2.13.1 is installed. But how do i find whether its rmagick 1 or rmagick 2? Is is the series starts with rmagick 2 belongs to rmagick 2 & series starts with rmagick 1 belongs to rmagick 1? Thanks in advan

Re: [Rails] Rails fails to find models in subfolders

2010-05-06 Thread Rick DeNatale
On Thu, May 6, 2010 at 6:58 AM, Andy Joel wrote: > I have my models and controllers set up in sub-folders, so, for example, > sample.rb is in app/models/sample_log, and samples_controller.rb is in > app/controllers/sample_log. The controllers are defined to be within a > namespace just though the

[Rails] Re: Questioning My Design

2010-05-06 Thread Dee
Ah ha! That does make sense, Rob! I've had similar problems before but haven't considered additional member functions. You are correct in assuming that I have those associations and named_scopes. The "current crops" is actually a named scope as is past crops, and more collections associated with th

[Rails] NULL value in CSV fixture, howto?

2010-05-06 Thread Owain
I am preparing some seed data for a deployment from generated a CSV file. However, one of the model's columns ( child_id) needs to have a null value in on a few of the rows where there is no Child instance. Whatever I have put in there, it seems to just come in as a zero. I have tried several com

Re: [Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Michael Pavling
On 6 May 2010 15:46, Joe wrote: > I've tried copying this code into the tutorials_controller: > > def self.ordered_by_position >    find :all, :order => 'position' >  end If you're calling "Tutorial.ordered_by_position" that code needs to be in the Tutorial model, not in a controller... -- You

[Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Joe
Thanks for your help, but I'm not sure where classes go. I've tried copying this code into the tutorials_controller: def self.ordered_by_position find :all, :order => 'position' end But it still has this error: undefined method `ordered_by_position' I assume this is because I have either

[Rails] Re: Input/output error

2010-05-06 Thread Nitin Mathur
Hi guys please help me out of this error. Nitin. -- 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

Re: [Rails] Questioning My Design

2010-05-06 Thread Rob Biedenharn
On May 6, 2010, at 9:34 AM, Dee wrote: Hi All, I'm writing a web app for a non-profit NGO that helps farmers in a co- op plan their crops better to reduce shortages, surpluses and unhealthy competition between themselves. Right now, I'm doing something that doesn't feel Rails-ee and want some f

[Rails] Re: Authenticate, THEN redirect

2010-05-06 Thread Aldric Giacomoni
Brendan Brewster wrote: > Hi, > > > def authenticate > return unless session[:user_id].nil? > authenticate_or_request_with_http_basic do |username, password| > user = User.first(:conditions => ['username like ? and password like > ?', username, password]) > if user > session[:u

[Rails] Validating the presence of foreign keys /associated objects

2010-05-06 Thread ct9a
hi guys, I been trying to find out on how to validate the presence of foreign keys/associated objects and the threads that talk about this are rather dated and unanswered. I looked at 1) http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/f8175db2a8321750/d565496a3672f19f?lnk=gs

[Rails] Re: Authenticate, THEN redirect

2010-05-06 Thread Brendan Brewster
Hi, You might want to check out this railscast tutorial (http://railscasts.com/episodes/82-http-basic-authentication). The authenticate_or_request_with_http_basic method is expecting the block to return true or false and will send an auth required status if false. It should be ok to return the

[Rails] Re: Authenticate, THEN redirect

2010-05-06 Thread Aldric Giacomoni
Robert Walker wrote: > Aldric Giacomoni wrote: >> Hi all. >> What I want to do: >> use HTTP Basic Authentication (stop screaming!) and then redirect to a >> welcome page. > > Is this an exercise for learning? If it's not then why would you even > consider solving this already solved problem. > >

[Rails] Questioning My Design

2010-05-06 Thread Dee
Hi All, I'm writing a web app for a non-profit NGO that helps farmers in a co- op plan their crops better to reduce shortages, surpluses and unhealthy competition between themselves. Right now, I'm doing something that doesn't feel Rails-ee and want some feedback. Here's the problem. Here's the s

[Rails] Re: dev tool

2010-05-06 Thread MichaelF
I have used NetBeans for the last 1.5 years. It has nice support for Rails/Ruby. I would suggest looking at NetBeans if you want an IDE. That being said, make sure you understand what the IDE is doing for you behind the scenes - I see too many developers who know how to invoke stuff via an IDE b

[Rails] Re: Applying a patch

2010-05-06 Thread Robert Walker
Mlle wrote: > Hello, > I've never applied a patch before and would like to know how to do it. > > How do I apply the " erb_encoding_workaround.patch" from : > > https://rails.lighthouseapp.com/projects/8994/tickets/2188-i18n-fails-with-multibyte-strings-in-ruby-19-similar-to-2038 http://ariejan.

[Rails] rmagick not working?

2010-05-06 Thread dare ruby
Dear Friends, I have installed Ruby 1.9.1 & rails 3.0.0 (beta vaersion) also its dependencies in my windows xp machine. I have also installed image magick version 6.6.1 q16. I need to work on task related to images, so i tried to install rmagick in my system, rmagick 2.13.1 installed successful

[Rails] Re: Performance Issue

2010-05-06 Thread Hitesh Rawal
Thanks Andy, For ur quick reply and valuable suggestion. I followed your suggestion and It improved performance and decrease the no. of db queries. Thanks Andy Jeffries wrote: >> > Sure: > > usedpermlicence = @licences.select {|o| o.status == 1 && o.licence_type > == > 0} > usedtemplicence =

[Rails] Re: Authenticate, THEN redirect

2010-05-06 Thread Robert Walker
Aldric Giacomoni wrote: > Hi all. > What I want to do: > use HTTP Basic Authentication (stop screaming!) and then redirect to a > welcome page. Is this an exercise for learning? If it's not then why would you even consider solving this already solved problem. http://github.com/binarylogic/authlo

[Rails] Re: new rails project with legacy DB (sort of)

2010-05-06 Thread agilehack
that is a great idea and I had that thought. It has several tables and some of the table many fields so is there an easy way to do that? Do you think taking a SQL dump of the DB and then copy paste most it into the migration file and then run rake db:migrate?? any other suggestions? I would thin

[Rails] Validate depending on action

2010-05-06 Thread Greg Ma
Hi, Is it possible use validations depending on the action? Greg -- 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 unsub

[Rails] Re: Nested Models? Creation Order

2010-05-06 Thread Xavier Snark
Hi X, Here's a walkthrough that illustrates what you are after... http://docs.google.com/document/pub?id=11q6lGi3p9YBcrGNHSBhkGTNYoFKgKRShxBX_ynEWQ1c X -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

Re: [Rails] Performance Issue

2010-05-06 Thread Andy Jeffries
> >@licences = Licence.scoped_by_user_id(10) >usedpermlicence = @licences.scoped_by_status_and_licence_type(1, 0) >usedtemplicence = @licences.scoped_by_status_and_licence_type(1, 1) >remainlicence = @licences.scoped_by_status_and_licence_type(0, 0) >remaintemplicence = @licence

[Rails] Re: Re: NameError - Problems with if-else

2010-05-06 Thread Marnen Laibow-Koser
Josh _ wrote: > As an unrelated, but hopefully helpful aside, I'd also recommend not > duplicating your markup in both the "if" and "else" sections. Doing > things > this way quickly gets hard to read and maintain. Better might be: > > <% if (article.gender == "Male") then color = '#d1e1fa' else

Re: [Rails] Rails fails to find models in subfolders

2010-05-06 Thread Vladimir Rybas
When you use subfolders - you have to use namespaces. And Rails(even 2.3.5), especially ActiveRecord, have a whole bunch of bugs with namespaces. I've fixed a couple, but there was more and more and more. I've jsut got rid of namespaces and subfolders then. On Thu, May 6, 2010 at 5:58 PM, Andy Joe

[Rails] Performance Issue

2010-05-06 Thread Hitesh Rawal
Hi, I am having one performance issue. I want to retrieve different kind of data from a single table with different conditions. here is example @licences = Licence.scoped_by_user_id(10) usedpermlicence = @licences.scoped_by_status_and_licence_type(1, 0) usedtemplicence = @licences.sc

Re: [Rails] Re: validation message in other module

2010-05-06 Thread Rahul Mehta
hii Fredrick,, i have setup the in my comment module validates_presence_of(:name,:comment) and what other detail you need , and i have copied the new form as it is in to my public module, and set customer flag to 1, please help. thanks rahu On Thu, May 6, 2010 at 4:23 PM, Frederick Cheung

[Rails] Rails fails to find models in subfolders

2010-05-06 Thread Andy Joel
I have my models and controllers set up in sub-folders, so, for example, sample.rb is in app/models/sample_log, and samples_controller.rb is in app/controllers/sample_log. The controllers are defined to be within a namespace just though the class name, eg like this: class SampleLog::SamplesControl

[Rails] Re: validation message in other module

2010-05-06 Thread Frederick Cheung
On May 6, 4:13 am, Rahul Mehta wrote: > please help on this is urgent... > You haven't really provided any detail - you've only provided the controller code, but none of the stuff showing how you setup validations Fred -- You received this message because you are subscribed to the Google Gro

Re: [Rails] dev tool

2010-05-06 Thread Ricardo
For java i like eclipse, but i don't use an ide for rails. In mac i use textmate plus shell and in linux i use gedit plus shell. And man, in my opinion these are very powerfull tools for development with ruby (and rails). Ricardo Valeriano On Wed, May 5, 2010 at 7:35 PM, Almir Campos (Zona8) < al

[Rails] Re: MySQL Constraints - Active Record

2010-05-06 Thread Ho-Sheng Hsiao
Try my fork, sparkfly-foreigner. I had added a much more comprehensive rspec suite to make sure it does what it says it does. http://github.com/sparkfly/foreigner Ho-Sheng Hsiao http://hosheng.blogspot.com/ http://ruby-lambda.blogspot.com/ On May 5, 1:16 pm, Marnen Laibow-Koser wrote: > >> Sugg

[Rails] Facebook, authlogic, and OAuth2

2010-05-06 Thread Alex
Has anyone gotten started with getting the OAuth2 replacement for Facebook Connect working with auth_logic? I know there is an OAuth2 gem (http://intridea.com/2010/4/22/oauth2- gem-just-in-time-for-facebook-graph?blog=company), and I'm thinking of using that to integrate. Anyone know when the Fb

[Rails] Input/output error

2010-05-06 Thread Nitin Mathur
Hi My application was running fine. All of sudden I started to get an input/output error in one of the templates. However, error goes away once I restart the mongrel server but after some time again same error appears. I am pasting the trace below. Please help me getting rid of this error forever.

[Rails] Multiple has_many through join table appears multiple times

2010-05-06 Thread all4 miller
Hi All, I am trying to configure my models to generate sql like this: select * from location inner join sales inner join product inner join calendar Currently the models all have this: class Location... has_many :sales :foreign_key => "location_id" has_many :products :through => :sales

[Rails] Re: Finding the next item, in a group of items.

2010-05-06 Thread Frederick Cheung
On May 3, 11:28 am, Joe wrote: > So I change it to this: <%= render :partial => > @category.tutorials.ordered_by_position %> > and I get the error: undefined method `ordered_by_position' > > I'm guessing that's because I have to create a method that orders them > by position. However I'm a noob

Re: [Rails] dev tool

2010-05-06 Thread Almir Campos (Zona8)
I had used Eclipse + Aptana plugin, but I prefer NetBeans. Regards, Almir. -- *Almir Campos * *tech.zona8.com.br almircampos.zona8.com.br* * Cel: 55 (11) 8980.9500 almircam...@zona8.com.br * * * 2010/5/2 Mlle > Can anyone suggest a dev

[Rails] CAS Authentication

2010-05-06 Thread Eric B.
So I have recently tried authenticating to a cas server for a project, and every time I try to access my cas server it returns SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Now I am using the CAS gem found here http://rubycas-client.rubyforge.org/