[Rails] Re: difference between in_groups and in_groups_of Rails

2014-11-02 Thread Frederick Cheung
On Saturday, November 1, 2014 8:41:12 PM UTC, Arup Rakshit wrote: Hi, I am not finding any difference between the 2 methods - in_groups and in_groups_of. Is their really any difference between in_groups and in_groups_of..

[Rails] Re: Difference between Cookies and Sessions

2014-07-07 Thread Robert Walker
Praveen BK wrote in post #1151760: Hello, Can anybody please define cookies and sessions and their differences in detail with reference to rails. What may be confusing you, that I've not seen mentioned yet, is that session identifiers are stored in cookies. Let me explain by looking at

[Rails] Re: Difference between _path and :action = 'some_method'

2013-03-18 Thread Frederick Cheung
On Monday, March 18, 2013 8:33:15 AM UTC, Barry wrote: Hello. So solved some error with just replacing path method with calling :action=... But I'm curious why in absolutely same in first case _path worked perfect, in second it causer an error which is solved just by changing syntax (but

[Rails] Re: Difference between save and create ?

2012-07-27 Thread manoj c.
thanks a lot. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: difference between build_ and .build

2012-03-28 Thread Tom Tom
LED wrote in post #1053782: hi im new in Ruby on rails and currently working with a reservation system can anyone explain what is the difference between current_package = build_reservation_package(:package_id = package_id) abd current_package =reservation_package.build(:package_id =

Re: [Rails] Re: difference between build_ and .build

2012-03-28 Thread Peter Vandenabeele
On Wed, Mar 28, 2012 at 8:41 PM, Tom Tom li...@ruby-forum.com wrote: LED wrote in post #1053782: hi im new in Ruby on rails and currently working with a reservation system can anyone explain what is the difference between current_package = build_reservation_package(:package_id = package_id)

Re: [Rails] Re: difference between %= and %

2011-08-19 Thread Walter Lee Davis
On Aug 18, 2011, at 6:05 PM, 7stud -- wrote: Tim Shaffer wrote in post #1017353: %= prints the contents of the tag, Well, it never meant that. %= tells ruby to print the result of the expression between the tags. For instance, %= 2+2 % would not print '2 + 2', it would print '4'. But

[Rails] Re: difference between %= and %

2011-08-19 Thread Pepe Sanchez
Thank you all for your answers! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email

[Rails] Re: difference between %= and %

2011-08-18 Thread Stefano
And you couldnt just try that out yourself? :D On Aug 18, 7:39 pm, Pepe Sanchez li...@ruby-forum.com wrote: Hi all what is the difference between %=  and % in a view file? thanks -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: difference between %= and %

2011-08-18 Thread 7stud --
Tim Shaffer wrote in post #1017353: %= prints the contents of the tag, Well, it never meant that. %= tells ruby to print the result of the expression between the tags. For instance, %= 2+2 % would not print '2 + 2', it would print '4'. But even the result of the expression isn't an

[Rails] Re: difference between attr_accessor and attr_accessible?

2011-03-07 Thread Frederick Cheung
On Mar 7, 4:45 pm, Gaba Luschi li...@ruby-forum.com wrote: Hi, What's the difference between attr_accessor and attr_accessible? They're completely unrelated. attr_accessor is a pure ruby method and creates a setter getter method for an instance variable. attr_accessible (and its

[Rails] Re: difference between attr_accessor and attr_accessible?

2011-03-07 Thread Gaba Luschi
Thanks - what's mass assignment? Assigning attributes to an object? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To

[Rails] Re: difference between attr_accessor and attr_accessible?

2011-03-07 Thread Tim Shaffer
This is mass assignment: User.new(params[:user]) Basically assigning all the attributes to the an instance based on the params[:user] hash. -- 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: Difference between rake test:units and individually running ruby -I test test/unit/something_tes

2010-12-23 Thread daze
On Dec 22, 10:38 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Let's see your error messages.  But why the heck are you defining an object like this anyway?  What are you trying to achieve? I'm trying to get a test for acts_as_list working. I've defined a method in test_helper that I

[Rails] Re: Difference between rake test:units and individually running ruby -I test test/unit/something_tes

2010-12-23 Thread Marnen Laibow-Koser
daze wrote in post #970337: On Dec 22, 10:38pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: Let's see your error messages. But why the heck are you defining an object like this anyway? What are you trying to achieve? I'm trying to get a test for acts_as_list working. I've defined a

[Rails] Re: Difference between rake test:units and individually running ruby -I test test/unit/something_tes

2010-12-23 Thread daze
Oh whoa okay thanks. I better make some changes now... :/ Can I use Shoulda w/ Rspec, or do I just use one over the other? And I should use this one https://github.com/rspec/rspec-rails, right? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Difference between rake test:units and individually running ruby -I test test/unit/something_tes

2010-12-23 Thread Marnen Laibow-Koser
Please quote when replying. daze wrote in post #970358: Oh whoa okay thanks. I better make some changes now... :/ Can I use Shoulda w/ Rspec, or do I just use one over the other? I understand Shoulda is usable with RSpec. I've never actually used Shoulda on any of my projects, though.

[Rails] Re: Difference between rake test:units and individually running ruby -I test test/unit/something_tes

2010-12-22 Thread Marnen Laibow-Koser
daze wrote in post #970203: Here's my issue: running ruby -I test test/unit/something_test.rb for each of my unit tests works perfectly. However, running rake test:units brings errors in all of them - some object becomes nil for some reason. And what object is that? Why might this be

[Rails] Re: difference between attr_accesor and attr_accesible

2010-12-21 Thread Frederick Cheung
On Dec 21, 12:20 pm, kp pariharkirt...@gmail.com wrote: I m new to ruby language. difference between att_accesor and attr_accessible is not clear to me. They're almost completely unrelated. attr_accessor is part of ruby itself and is equivalent to calling attr_writer and attr_reader for the

Re: [Rails] Re: difference between attr_accesor and attr_accesible

2010-12-21 Thread kirti parihar
hey...thanks for help. On Tue, Dec 21, 2010 at 7:07 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Dec 21, 12:20 pm, kp pariharkirt...@gmail.com wrote: I m new to ruby language. difference between att_accesor and attr_accessible is not clear to me. They're almost

[Rails] Re: difference between belongs_to and references keyword?

2010-06-14 Thread Marnen Laibow-Koser
Kevin Hastie wrote: [...] j) What seems much easier is to have the Business and School tables to each have an address_id, and be done with it. That's correct. That's what I would have done days ago were I programming a language without so many handy shortcuts. But to do so, doesn't it

[Rails] Re: difference between belongs_to and references keyword?

2010-06-12 Thread sir ziggles
i am interested in the answer to this as well. please post if you find out. -- 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.

[Rails] Re: difference between belongs_to and references keyword?

2010-06-10 Thread Kevin Hastie
Kevin Hastie wrote: Kevin Hastie wrote: I guess what I really want is something like this: class Address ActiveRecord::Base belongs_to :addressable, :polymorphic = true end class Business ActiveRecord::Base has_one :address, :as = :addressable end class School

[Rails] Re: difference between belongs_to and references keyword?

2010-06-04 Thread Ugis Ozols
I've written a short example about has_many, belongs_to - http://gist.github.com/425026 has_many, has_one, belongs_to deffinitions goes into model and not in scaffold. You can use references like this: script/generate scaffold address company:references address:text but as I mentioned in this

[Rails] Re: difference between belongs_to and references keyword?

2010-06-04 Thread Ugis Ozols
Correction to my previuos message: you can use belongs_to and references as column types in scaffold (and migrations). They do same thing: add belongs_to association to model. On Jun 4, 9:05 am, Ugis Ozols ugis.ozo...@gmail.com wrote: I've written a short example about has_many, belongs_to

[Rails] Re: difference between belongs_to and references keyword?

2010-06-03 Thread Kevin Hastie
Kevin Hastie wrote: a) Am I doing this right? Apparently not. Weird. Is it because I didn't do polymorphic anywhere that Address now has a business_id, a credit_card_id and a user_id? Obviously this is no good - I'd prefer the Business table to have an address_id, etc So: e) Did I do

[Rails] Re: difference between belongs_to and references keyword?

2010-06-03 Thread Kevin Hastie
Kevin Hastie wrote: I guess what I really want is something like this: class Address ActiveRecord::Base belongs_to :addressable, :polymorphic = true end class Business ActiveRecord::Base has_one :address, :as = :addressable end class School ActiveRecord::Base has_one :address, :as =

[Rails] Re: difference between singularized symbol and pluralized sy

2010-01-30 Thread Marnen Laibow-Koser
John Merlino wrote: Hey all, Does anyone know the difference between a singularized symbol (:student_state) and a pluralized symbol (:student_states). How can they be used differently. Thanks for suggestions. They're completely different symbols. What are you really trying to ask? Best,

[Rails] Re: difference between singularized symbol and pluralized sy

2010-01-30 Thread John Merlino
Marnen Laibow-Koser wrote: John Merlino wrote: Hey all, Does anyone know the difference between a singularized symbol (:student_state) and a pluralized symbol (:student_states). How can they be used differently. Thanks for suggestions. They're completely different symbols. What are you

[Rails] Re: difference between singularized symbol and pluralized sy

2010-01-30 Thread Marnen Laibow-Koser
John Merlino wrote: Marnen Laibow-Koser wrote: John Merlino wrote: Hey all, Does anyone know the difference between a singularized symbol (:student_state) and a pluralized symbol (:student_states). How can they be used differently. Thanks for suggestions. They're completely different

[Rails] Re: Difference between ruby1.8.6 and 1.8.7

2010-01-21 Thread Aleksey Gureiev
Hi Tom, From what I know, Rails 3 won't work with Ruby 1.8.6. There's a fix in Ruby 1.8.7 they count on. Aleksey On Jan 21, 3:50 pm, Tom Mac li...@ruby-forum.com wrote: Hi     I am using ruby1.8.6 for development in fedora12 since in yum repository the latest is that. Is there any problem

Re: [Rails] Re: Difference between Mongrel and Webrick

2010-01-15 Thread Niels Meersschaert
I would actually argue that even Mongrel at this point would be considered deprecated by that definition. Most deploy environments are using Passenger even that is now looking like Unicorn might give it a run. I switched to using Passenger for my dev environment over a year ago. Niels On

Re: [Rails] Re: Difference between Mongrel and Webrick

2010-01-15 Thread Norm Scherer
Niels Meersschaert wrote: I would actually argue that even Mongrel at this point would be considered deprecated by that definition. Most deploy environments are using Passenger even that is now looking like Unicorn might give it a run. I switched to using Passenger for my dev environment

[Rails] Re: Difference between Mongrel and Webrick

2010-01-14 Thread Anachronistic
WEBrick was dropped and isn't considered a serious contender. Mongrel replaced it. Even in 2007 you can find mention of WEBrick being semi- deprecated as Mongrel gained favor. Technically, deprecated only means should be avoided in favor of a more suitable alternative. Outright replaced is

[Rails] Re: Difference between Mongrel and Webrick

2010-01-13 Thread Frederick Cheung
On Jan 13, 2:51 pm, Rails ROR developra...@gmail.com wrote: Hi Everybody, I would like to know the exact difference between Mongrel and Webrick. I have gone through few sites about Mongrel and Webrick differences. I came to know that Mongrel is fast, efficient than Webrick. Are there any

[Rails] Re: Difference between Mongrel and Webrick

2010-01-13 Thread [AFH]
Accidentally direct messaged, apologies. WEBrick has basically been deprecated, even for development purposes. Mongrel is faster and more reliable and now the de facto standard in the community. Alan http://www.twitter.com/anachronistic -- You received this message because you are subscribed

[Rails] Re: Difference between Mongrel and Webrick

2010-01-13 Thread pharrington
On Jan 13, 10:24 am, [AFH] afharri...@gmail.com wrote: Accidentally direct messaged, apologies. WEBrick has basically been deprecated, even for development purposes. Mongrel is faster and more reliable and now the de facto standard in the community. Alan

Re: [Rails] Re: Difference between Mongrel and Webrick

2010-01-13 Thread Steve Klabnik
There's also Unicorn. -- 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.

[Rails] Re: Difference between two dates

2009-09-28 Thread Jason Lillywhite
Rob Olson wrote: Subtracting two dates gives a Rational which is the reason for the integer conversion. why does it return a Rational type? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: Difference Between ROR and Django...

2009-08-17 Thread Trausti Thor Johannsson
Well, if you want to hear what is bad about python, ask here and ask the python people about ruby. As for learning something carrier wise, learn both and learn php and cakephp. If you only know one, you are not very good. Also, you pick one and become really good with it, that is the best

[Rails] Re: Difference Between ROR and Django...

2009-08-17 Thread rilindo foster
I tried Django when I was focusing on making Python my primary language and. . . I went through a few tutorials, but I could not quite get it. At the time, though, I wasn't terribly familiar with OOP concepts* and when I found myself not being able to access python.org at work (long story), I

[Rails] Re: Difference Between ROR and Django...

2009-08-17 Thread Robby Russell
Since you're on a Rails list... I'll keep this short. Django is the best solution (if you like snakes). Ruby on Rails is the best solution (if you like Trains). If you like snakes AND trains... well, you're going to have to evaluate the pros/cons with a different set of metrics. Robby... who

[Rails] Re: difference between html.erb and .erb

2009-05-22 Thread Robert Walker
saljamil wrote: I spend few hours debugging a flash chart issue. At the end and after a lot of trial and error, I switched my view name from dashboard.erb to dashboard.html.erb and that resolved the problem. Any idea why? I tried to google for the difference between the two but could not find

[Rails] Re: difference between html.erb and .erb

2009-05-22 Thread Robert Walker
Robert Walker wrote: The old Rails views used the extension /rhtml (for Ruby HTML). In newer Typo correction .rhtml not /rhtml -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: Difference between include and joins in find?

2008-11-19 Thread boblu
Sorry, that was my typo. The correct error was: ## table 1: companies ## id int name string ## table 2: sections ## id int ref_company_id int ref_meta_id int sec_name string class Company ActiveRecord has_one :main_section, :class=Section,

[Rails] Re: Difference between include and joins in find?

2008-11-18 Thread boblu
I finally get this right. Here is the conclution. In find method, use :join=[:association_name] will simply do a 'full join', which drop all rows that do not match the association conditions. use :join=['join table_b on table_a.id=table_b.xx'], this is a 'full join' too. use :join=['left(or

[Rails] Re: Difference between include and joins in find?

2008-11-18 Thread Frederick Cheung
Well to answer the question in the subject line, I wrote this a little while back: http://www.spacevatican.org/2008/6/22/the-difference-between-include-and-joins A key thing to note is that include in 2.1 and include in 2.0.2 are different (but the 2.1 code will fall back to the 2.0.2 code if

[Rails] Re: Difference between include and joins in find?

2008-11-18 Thread boblu
yes, the compannies table does not have a columns called ref_company_id. It is the table which is referreced by the sections table that has a ref_company_id as a foreign key. Can you explain why that error comes out? 'cause I cannot find any clue about it. And thank you for mentioning your blog

[Rails] Re: Difference between include and joins in find?

2008-11-18 Thread boblu
Harold to me As far as I know, the reason for :include is mainly for eager loading. If you know you will be querying the sections table for the companies you are finding, doing an :include will retrieve those sections in one query, ie, one trip to the DB. If you don't pass in the :include

[Rails] Re: Difference between include and joins in find?

2008-11-18 Thread Frederick Cheung
On 18 Nov 2008, at 23:41, boblu wrote: yes, the compannies table does not have a columns called ref_company_id. It is the table which is referreced by the sections table that has a ref_company_id as a foreign key. Can you explain why that error comes out? 'cause I cannot find any clue

[Rails] Re: Difference between include and joins in find?

2008-11-17 Thread boblu
OK. I figured out that join is actually doing an inner join which filters the rows that don't have association. And include is actually doing an 'outter join' which shows all the rows from tables. But, however, I still can not figure out why that strange SQL statement comes out. Can anyone

[Rails] Re: Difference between Collection, method and action

2008-11-14 Thread Robert Walker
Robin Cua wrote: Hi, what are the differences between Collection, Method and Action? How to call each? Collection: An array of objects, resources, etc. Method: A function that is scoped within a class or object instance in an Object Oriented Program (OOP). Action: A special method that is

[Rails] Re: difference between model and scaffold generators

2008-10-05 Thread Frederick Cheung
On Oct 5, 4:01 pm, Jay Pangmi [EMAIL PROTECTED] wrote: Hi, among lots other confusions herez one.. I found two kinda similar (:to me) = script/generate model business name:string address:string location_id:integer AND script/generate scaffold business name:string address:string

[Rails] Re: ****[Rails] Re: difference between model and scaffold generators

2008-10-05 Thread Craig White
On Sun, 2008-10-05 at 08:48 -0700, Frederick Cheung wrote: On Oct 5, 4:01 pm, Jay Pangmi [EMAIL PROTECTED] wrote: Hi, among lots other confusions herez one.. I found two kinda similar (:to me) = script/generate model business name:string address:string location_id:integer AND