[Rails] difference between in_groups and in_groups_of Rails

2014-11-01 Thread Arup Rakshit
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.. http://api.rubyonrails.org/classes/Array.html#method-i-in_groups.

-- 

Regards,
Arup Rakshit

Debugging is twice as hard as writing the code in the first place. Therefore, 
if you write the code as cleverly as possible, you are, by definition, not 
smart enough to debug it.

--Brian Kernighan

-- 
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/1553450.DQrx40ihLd%40linux-wzza.site.
For more options, visit https://groups.google.com/d/optout.


[Rails] Difference between Cookies and Sessions

2014-07-07 Thread Praveen BK
Hello,

 Can anybody please define cookies and sessions and their
differences in detail with reference to rails.


Thank you,
Praveen

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/6c917df7bf555a6e49a8fbfb68cd6144%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Difference between Cookies and Sessions

2014-07-07 Thread Andy Jeffries
Cookies are stored key/value pairs (with other attributes such as expiry,
domain, path and ssl requirements) in the client's browser.  The
specification for them is in the HTTP specification and these can
(generally) be read by backend languages such as Rails or frontend
technologies such as Javascript.

Sessions are an unrestricted storage area for applications, generally used
by the backend language only (due to encryption and hash protection with
server side secrets), although they may be stored in their entirety in a
client-side cookie for convenience to avoid sticky sessions where
requests have to come back to the same backend server.

Hope this helps.

Cheers,


Andy

*Andy Jeffries* Ruby on Rails, RubyMotion, jQuery Developer  Taekwondo 6th
Dan Instructor
andyjeffries.co.uk +44 7939 164853 @andyjeffries
http://twitter.com/andyjeffries fb.com/andyjeffries
http://facebook.com/andyjeffries


On 7 July 2014 10:21, Praveen BK li...@ruby-forum.com wrote:

 Hello,

  Can anybody please define cookies and sessions and their
 differences in detail with reference to rails.


 Thank you,
 Praveen

 --
 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 unsubscribe from this group and stop receiving emails from it, send an
 email to rubyonrails-talk+unsubscr...@googlegroups.com.
 To post to this group, send email to rubyonrails-talk@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/rubyonrails-talk/6c917df7bf555a6e49a8fbfb68cd6144%40ruby-forum.com
 .
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CANRNWfgM%3DN4eEuPKW7NN4DGHNL3O%3D9%2BNcHZgWTWvm0dFEW%2Bbdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] difference between Self joins and self-referential association

2013-12-07 Thread John Merlino
self-joins are discussed here:
http://guides.rubyonrails.org/association_basics.html#self-joins

self-referential association is discussed here:
http://railscasts.com/episodes/163-self-referential-association

The main difference I see is that self-referential association creates a 
join model, such as friendship, which links another model, such as user, to 
itself, so a user can have many friends (which are other users), and a 
friend can be befriended by a user. The self-joins looks like there is no 
join model. Simply a foreign key is added to the same model, such as a 
manager_id column to the employee model. An employee, who is a manager, can 
have many other employees, who are subordinates. And the link is done on 
the same table itself, association the employee manager_id column with the 
the employee id column. To me, these two techniques look virtually the 
same. Is there a difference and which is preferred? 

-- 
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/bdd46a05-4cbe-4db3-ac90-679ffbdfedd5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] difference between Self joins and self-referential association

2013-12-07 Thread Colin Law
On 7 December 2013 19:23, John Merlino stoici...@aol.com wrote:
 self-joins are discussed here:
 http://guides.rubyonrails.org/association_basics.html#self-joins

 self-referential association is discussed here:
 http://railscasts.com/episodes/163-self-referential-association

 The main difference I see is that self-referential association creates a
 join model, such as friendship, which links another model, such as user, to
 itself, so a user can have many friends (which are other users), and a
 friend can be befriended by a user. The self-joins looks like there is no
 join model. Simply a foreign key is added to the same model, such as a
 manager_id column to the employee model. An employee, who is a manager, can
 have many other employees, who are subordinates. And the link is done on the
 same table itself, association the employee manager_id column with the the
 employee id column. To me, these two techniques look virtually the same. Is
 there a difference and which is preferred?

With a join model the relationship is symetrical.  Each user can have
many friends and can be the friend of many other users, similar to a
has_and_belongs_to_many association.  With the self referential
association you describe, a manager can have many employees but an
employee can belongs to only one manager (like a has_many, belongs_to
association).  So which one to use depends on the requirements.

Colin

-- 
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuOKFb3e4JVoyTtkH0SJDurPSsxSXRwsjsGnPRWXy4pHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


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

2013-03-18 Thread Barry
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 
not the sence of what is happening)
First case:

%= form_for @answer, {:url = create_answer_test_path(@test), :html = 
{:id=form_#{@key.position}}, :remote=true}

worked with no problem

%= button_to '-', {:url=delete_answer_test_path(@test)}, 
:method=:delete, :remote =true %

Caused several types of errors:

ActionController::RoutingError (No route matches {:action=delete_answer, 
:controller=tests, :id=nil})

Started DELETE 
/tests/150/create_answer?key_id=905url=%2Ftests%2F150%2Fdelete_answer 
for 127.0.0.1 at 2013-03-18 12:08:36 +0400 (??? for some reason started 
previous method and 'delete_answer' was just in server call)

But when I replaced it with {:controller='tests', :action = 
'delete_answer'} (which is basically just another way of syntax, but not of 
what is going on) works fine.

?


-- 
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Talk group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/8eouGU9Pm9QJ.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Difference between save and create ?

2012-07-27 Thread manoj c.
Hi,
Anybody please help me showing difference between save and create in
ruby on rails. expecting help.



Regards,
Manoj.

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Difference between save and create ?

2012-07-27 Thread Loganathan Sellapa
Refer this link '
http://www.rorexperts.com/differences-between-create-and-save-methods-in-active-record-t1348.html
'

regards,
Loganathan
ViewMe http://vizualize.me/loganathan


On Fri, Jul 27, 2012 at 3:20 PM, manoj c. li...@ruby-forum.com wrote:

 difference between save and create

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] difference between build_ and .build

2012-03-28 Thread LED
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 = package_id)
because i tried using the first one but no good but when i try the
second it worked i think both are the same please correct me if im
wrong thank

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between merging a hash in ruby and using merge_conditions of activerecord

2012-03-23 Thread John Merlino
The ruby library comes with a method called merge that allows you to
merge two hashes. So then why does merge_conditions exist in
activereocrd, which appears to be doing the same thing.

thanks for response

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between %= and %

2011-08-18 Thread Pepe Sanchez
Hi all

what is the difference between %=  and % in a view file?


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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between PHP and RubyOnRails

2011-06-20 Thread Margaret
Can you please explain the difference between PHP and RubyOnRails.
I am trying to get a web-based application developed for an online
personality test, and
would like something secure, has database abilities, graphing
abilities, backend calculation capabilities. Please advise! I was told
to have the program developed as a Wordpress plugin using PHP. Is this
passe, or a good idea? 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-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] difference between PHP and RubyOnRails

2011-06-20 Thread Hassan Schroeder
On Sun, Jun 19, 2011 at 6:37 PM, Margaret enneamo...@gmail.com wrote:
 Can you please explain the difference between PHP and RubyOnRails.

PHP is a programming language; Ruby on Rails is a web application
development platform using the Ruby language.

 I am trying to get a web-based application developed for an online
 personality test, and
 would like something secure, has database abilities, graphing
 abilities, backend calculation capabilities. Please advise! I was told
 to have the program developed as a Wordpress plugin using PHP.

told to ? So I'm guessing you're not a developer yourself? In that
case the most important thing is to find a developer that you trust,
regardless of what language/platform s/he uses.

 Is this passe, or a good idea? Thank you.

Your application sounds perfect for Rails. The idea of creating it as a
plugin for Wordpress sounds like welding a basket on a submarine to
wash lettuce.

But see my first point above :-)

Good luck!
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] difference between PHP and RubyOnRails

2011-06-20 Thread Walter Lee Davis


On Jun 19, 2011, at 9:37 PM, Margaret wrote:


Can you please explain the difference between PHP and RubyOnRails.
I am trying to get a web-based application developed for an online
personality test, and
would like something secure, has database abilities, graphing
abilities, backend calculation capabilities. Please advise! I was told
to have the program developed as a Wordpress plugin using PHP. Is this
passe, or a good idea? Thank you.



Some basic terminology first:

PHP is a language, Ruby is a language. CakePHP or Zend Framework are  
examples of PHP Web frameworks, and Rails is a Ruby Web framework.  
There are many others, in both languages. These languages have a lot  
of following in the Web development community, because they are  
dynamic (flexible) and there are great hooks into traditional Web  
workflows. Other languages include Python, C#, even C itself (which is  
the mother language of Ruby and PHP -- they're both written at the  
lowest level in C).


Wordpress is a blogging application, written in PHP. It is not,  
strictly speaking, the same kind of thing as Cake or Zend. Instead,  
you could use either of those frameworks to create an application  
similar to Wordpress.


A good programmer could implement your elevator pitch requirements  
using nearly any Web-friendly language or toolkit, and this choice of  
framework or language should be made by the person who is doing the  
work. It's their productivity that will be impacted most by this  
choice, not the possibility of meeting your deliverables.


Unless you are the one who will be coding this, I recommend that you  
write the clearest possible explanation of your business goals, and  
put it out for bid. Throw out the highest and lowest bid, and use only  
as one tiny factor in your decision which language or framework the  
final product is developed in. You do have a certain responsibility to  
yourself to choose a popular development style, simply because your  
prime developer may not be the person who ends up maintaining the  
thing. You want to stay in one of the larger tents so you can hire  
someone to pick up the pieces later.


Walter


--
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between attr_accessor and attr_accessible?

2011-03-07 Thread Gaba Luschi
Hi,

What's the difference between attr_accessor and attr_accessible?

Is attr_accessor to create a virtual variable/object and attr_accessible
makes it accessible?  Do you need attr_accessible if you already have
attr_accessor?

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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Difference between rake test:units and individually running ruby -I test test/unit/something_test.rb ?

2010-12-23 Thread Colin Law
On 23 December 2010 03:17, daze dmonopol...@gmail.com wrote:
 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.

 Why might this be happening?

 Specifics: the object that is successfully not nil when I run the unit
 tests one-by-one but becomes nil when I do rake test:units is defined
 like this...

 klass = self.name.gsub(/Test$/, ).constantize
 instance = klass.first

You could use ruby-debug to break into the test at the point of
failure and inspect the data and see what is going on.  If you have
not used ruby-debug have a look at the Rails Guide on debugging to see
how.

Colin

-- 
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, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Difference between rake test:units and individually running ruby -I test test/unit/something_test.rb ?

2010-12-22 Thread daze
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.

Why might this be happening?

Specifics: the object that is successfully not nil when I run the unit
tests one-by-one but becomes nil when I do rake test:units is defined
like this...

klass = self.name.gsub(/Test$/, ).constantize
instance = klass.first

...and I'm sure that my test db is populated whenever I run my tests...

-- 
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, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between attr_accesor and attr_accesible

2010-12-21 Thread kp
I m new to ruby language. difference between att_accesor and
attr_accessible is not clear to me.

thanks for your kind help.
kp
(india)

-- 
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, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between belongs_to and references keyword?

2010-06-03 Thread Kevin Hastie
First, I am very new to ruby and rails.  Searching for references is
really tough, and so I've finally come here.

I'm trying to create a scaffold.  Let's say a Business and a School both
can have a single Address (not shared).  In a different case, an Offer
has an OfferType (with just a type_id and description).  Also, a
Business can have many Offers.

(I've stripped off most of the unrelated columns, like last_name,
etc...)

I'm wondering (in about this order):

a) Am I doing this right?

b) What the difference would be if I used Address business:belongs_to
user:belongs_to instead of references?

c) Is the Business address:has_one redundant with Address
business:references? If not, what does it do? What about the has_many?

d) Will this generate join tables for me? And I don't need to specify
x_id's anywhere in these relationships?

./script/generate scaffold Business address:has_one offer:has_many
name:string first_name:string

./script/generate scaffold School address:has_one name:string

./script/generate scaffold Address business:references school:references
address1:string

./script/generate scaffold Offer business:references offerType:has_one
start_date:datetime

./script/generate scaffold OfferType image:has_one name:string
description:text

(I'm on Ruby 1.8.7 and Rails 2.3.8.)

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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between singularized symbol and pluralized symbol

2010-01-30 Thread John Merlino
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.
-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] difference between underscore, tableize and self.class.model

2010-01-26 Thread John Merlino
Hey all,

Not sure what the difference between underscore and tableize, other than
tableize also pluralizes. However, not sure how they can be used
differently. Obviously, you can use tableize to reference table name in
database. But what different functionality does underscore provide?
Also, what different functionality would calling self.class.model, where
model is a model. Basically, while I know what these three are, I'm not
sure how they can be used differently.
Thanks for any suggestions.
-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



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

2010-01-21 Thread Jeffrey L. Taylor
Quoting Tom Mac li...@ruby-forum.com:
 Hi
 I am using ruby1.8.6 for development in fedora12 since in yum
 repository the latest is that. Is there any problem if continuing with
 that and later migrating to 1.8.7 .Is there any big difference between
 them? Please share your thoughts
 

Ruby 1.8.7 breaks assert2's Ruby parsing, the conditions still pass or fail
properly, but the display of all the intermediate values does not happen.
Still useful for testing, but no help debugging.  Effectively negates the
advantage of assert2 over the regular assert.

I intend to move to Ruby 1.9 and Rails3 as soon as they both become stable, so
I'm not ripping all the assert2 out, but it is a nuisance til then.

Jeffrey

-- 
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, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Difference between ruby1.8.6 and 1.8.7

2010-01-20 Thread Tom Mac
Hi
I am using ruby1.8.6 for development in fedora12 since in yum
repository the latest is that. Is there any problem if continuing with
that and later migrating to 1.8.7 .Is there any big difference between
them? Please share your thoughts

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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.




[Rails] Difference between Mongrel and Webrick

2010-01-13 Thread Rails ROR
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 other differences other than this? Which one is better?

Are there any other servers other than Mongrel and Webrick.

Thanks in advance.
-- 

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, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Difference Between ROR and Django...

2009-08-17 Thread Ram Kumar.K

Hi I am the newbie to both Django as well as ROR Which one i have
to choose as my carrier one And what is the main difference
Djkango in Python  It is in Ruby..
which one is best to easy learn and about security
Thank you...
-- 
WithRegards...
K.Ramkumar
Blog at http://fallinlinux.wordpress.com/
contact : 97915 89522

--~--~-~--~~~---~--~~
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 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] difference between html.erb and .erb

2009-05-22 Thread saljamil

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
anything meaningful. I have a mix of views with only .erb and html.erb
in my app. Thanks for the insight.
--~--~-~--~~~---~--~~
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 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Difference between include and joins in find?

2008-11-17 Thread boblu

I had real weird problem here.

If I use joins in find, both development and production environment
give right answers.
But, when I use  include in find, the development environment goes
all right. However, the find method fails in production enviroment.

Let me describe this in detail.

I have two tables.

##   table 1: companies  ##
id  int
.

##   table 2: sections   ##
id int
ref_company_id  int
ref_meta_id  int


A company will have one section, and a section may have sub-sections.
when ref_meta_id is 0, the section is the main section of a company
whose id is ref_company_id.
when ref_meta_id is not  0, the section is a sub-section of a company
whose id is ref_company_id.


And here are the two models

#  class Company   ActiveRecord
#has_one  :main-
section,  :class=Section,  :foreign_key=ref_company_id, 
:conditions=ref_meta_id=0
#has_many  :all-
sections, :class=Section,  :foreign_key=ref_company_id
#  end

#  class Section  ActiveRecord
#
belongs_to :company, :class=Company, :foreign_key=ref_company_id
#  end


All these things are good in both development and production
environment.
#  Company.find(1).main-section
#  Company.find(1).all-sections
#  Section.find(1).company


Now comes to the find method used in controller.
First use joins, as I said before, the following methods went well in
both development and production enviroment.
#  Company.find(:all, :select='companies.*', :joins=[:all-
sections],  :conditions=companies.id500)
#  Company.find(:all, :select='companies.*', :joins=[:all-
sections],  :conditions=sections.id500)

Then use include,
#  Company.find(:all, :select='companies.*', :joins=[:all-
sections],  :conditions=companies.id500)
this went well in both development and production enviroment.

However,
#  Company.find(:all, :select='companies.*', :joins=[:all-
sections],  :conditions=sections.id500)
this went well in development environment, but in production
environment, I get this error.

*
Unknown column 'companies.ref_company_id' in 'field list':
SELECT `companies`.`id` AS t0_r0,
  `companies`.`ref_company_id` AS t0_r16,
  `companies`.`ref_meta_id` AS t0_r17,
  `sections`.`id` AS t1_r0,
  `sections`.`ref_company_id` AS t1_r1,
  `sections`.`ref_meta_id` AS t1_r2,
FROM`companies`  LEFT OUTER JOIN `sections` ON
sections.ref_meta_id = companies.id
WHERE  ( sections.id500 )
**

And this is definetely a wrong SQL statement

Can anybody explain this?
And Can anybody please explain what is the difference between include
and join?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Difference between Collection, method and action

2008-11-14 Thread pain

Hi, what are the differences between Collection, Method and Action?
How to call each?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] difference between model and scaffold generators

2008-10-05 Thread Jay Pangmi

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
location_id:integer

but with model I couldn't do this:
http://localhost:port-number/businesses

but with scaffold this url came with the option to give input which is
saved in the database.

So, I don't use model but scaffold. So, can someone plz lighten me up on
this. thnx..
-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---