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..
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
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
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
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 =
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)
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
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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.
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
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
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
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
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 =
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,
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
54 matches
Mail list logo