Hi all i'm trying to learn Rspec testing can anyone suggest me the best
book to learn Rspec with good sample code.
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-talk@
Hi Weston,
No, the four Gemfile.lock file are the only ones on my computer.
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@googleg
It is an Open Ended Consulting Assignment (3-6 months+) with an Open Rate.
Please contact us 212-338-9595 if you are available / interested. If you
are not, please feel free to forward this to anyone you know, who would be
a good fit, and is looking for a job.
Thanks
Job Description:
Under th
Sam Ginko wrote in post #1071240:
> Colin Law wrote in post #1071227:
>> On 3 August 2012 22:03, Sam Ginko wrote:
>>> i.day.ago.to_date => { :coder=>@numdeployed, :imedidata=>@numdeployed,
>>> :balance=>@numdeployed, :CTMS=>@numdeployed },
>>> i += 1
>>> end
>>>
>>>
>>> Original Data Hash
>>>
Hello HTH,
Thanks. I must have missed in the doc as I thought one could not put
polymorphic => true on has_one.
Regarding a person having multiple roles (Staff + Mother) I noticed the
issue and was planning on putting
an intermediate Peron -> Role on-to-many in but you way might be easier.
Reg
Daniel Mantilla wrote in post #1071237:
> This should work:
>
> items = 12.times.map { [i.day.ago.to_date, { :coder=>@numdeployed,
> :imedidata=>@numdeployed,
> :balance=>@numdeployed, :CTMS=>@numdeployed } ] }.flatten
> result = Hash[*items]
>
> Daniel
Thanks Daniel, I will try this.
--
Posted
Colin Law wrote in post #1071227:
> On 3 August 2012 22:03, Sam Ginko wrote:
>> i.day.ago.to_date => { :coder=>@numdeployed, :imedidata=>@numdeployed,
>> :balance=>@numdeployed, :CTMS=>@numdeployed },
>> i += 1
>> end
>>
>>
>> Original Data Hash
>>
>> @data = {
>> 1.day.ago.to_date => {
This should work:
items = 12.times.map { [i.day.ago.to_date, { :coder=>@numdeployed,
:imedidata=>@numdeployed,
:balance=>@numdeployed, :CTMS=>@numdeployed } ] }.flatten
result = Hash[*items]
Daniel
On Friday, August 3, 2012 5:03:04 PM UTC-4, Ruby-Forum.com User wrote:
>
> I'm trying to create
On 3 August 2012 22:03, Sam Ginko wrote:
> I'm trying to create a dynamic loop within the hash @data below and
> can't really seem to figure it out. The array within the hash has to be
> dynamic i:e the day number has to be generated by a loop either while or
> until and the name of the product a
Tom Allison wrote in post #1070825:
> Ran into a great problem. REST, as it's implimented via Rails,
> identifies
> the URL as a plural in every case. So you would retrieve a single issue
> through /issues/. This seems to be technically
> incorrect.
>
> I find other (non-Rails) documentation tal
I'm trying to create a dynamic loop within the hash @data below and
can't really seem to figure it out. The array within the hash has to be
dynamic i:e the day number has to be generated by a loop either while or
until and the name of the product and number are dynamic as well. I'll
try to explain
Martyn W. wrote in post #1071177:
> I have a 'has many through' relationship in my models. I am trying to
> access objects from either side of this relationship, with mixed
> results.Here are my models:
>
> class Material < ActiveRecord::Base
> attr_accessible :description, :number
>
On 3 August 2012 20:40, Steve Morrissey wrote:
> I'm working on a into rails project in parallel with a book I'm reading.
> I have 3 models/controllers that I'm trying to get to interact properly:
> user, article, comment
>
> Each article can have many comments, each comment is made by 1 user.
> C
Douglas Lovell wrote in post #1071218:
> Steve:
>
> Assuming your many comments to one user relation is set-up properly, ask
> for cu = comment.user. Then <%= cu.username %> will work for you.
>
> Doug
>
> Douglas Lovell
> www.wbreeze.com
Worked perfectly, thank you! :)
--
Posted via http://www
Steve:
Assuming your many comments to one user relation is set-up properly, ask
for cu = comment.user. Then <%= cu.username %> will work for you.
Doug
Douglas Lovell
www.wbreeze.com
On 08/03/2012 03:40 PM, Steve Morrissey wrote:
I'm working on a into rails project in parallel with a book I
I'm working on a into rails project in parallel with a book I'm reading.
I have 3 models/controllers that I'm trying to get to interact properly:
user, article, comment
Each article can have many comments, each comment is made by 1 user.
Currently I'm able to get the article to show the comment co
Our test suite (rspec/capybara+webkit/jasmine) which was broken by 3.2.7 is
working perfectly in 3.2.8.rc2.
Thanks!
--Daniel Evans
On Friday, August 3, 2012 8:29:57 AM UTC-6, Santiago Pastorino wrote:
>
> Hi everyone,
>
> Rails 3.2.8.rc2 has been released. If no regressions are found we will
>
> I don't know how host to Ruby On Rails app in network solution.
> I uploaded file in "/var/www/vhosts/default/htdocs/rails/app-name".
> I also used haml in my rails application.
Which HTTP-Server are you using? If it is nginx or apache you could
take a look into phusion passenger (http://www.mod
Please remember to quote the previous message so that it is easier to
follow the thread, remember this is a mailing list not a forum (though
you may be accessing it through a forum like interface).
On 3 August 2012 17:02, Martyn W. wrote:
> For <%= work_ticket.material.number %>
>
> I get undefin
For <%= work_ticket.material.number %>
I get undefined method `number' for nil:NilClass
--
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@goo
On 3 August 2012 15:57, Martyn W. wrote:
> I have a 'has many through' relationship in my models. I am trying to
> access objects from either side of this relationship, with mixed
> results.Here are my models:
>
> class Material < ActiveRecord::Base
> attr_accessible :description, :numbe
I have a 'has many through' relationship in my models. I am trying to
access objects from either side of this relationship, with mixed
results.Here are my models:
class Material < ActiveRecord::Base
attr_accessible :description, :number
has_many :parts
has_many :work_tickets,
Hi everyone,
Rails 3.2.8.rc2 has been released. If no regressions are found we will
release 3.2.8 final around Wednesday 8th.
## IMPORTANT
We are removing all the deprecation warnings that we introduced in 3.2.x.
We have decided to stop introducing API deprecations in all point
releases going fo
I'm sorry if it made no sense to my sentence. The next will be clearer.
On Fri, Aug 3, 2012 at 9:14 AM, Colin Law wrote:
> On 3 August 2012 13:00, Esmerino Jr wrote:
> > Michael Pavling, thanks for reply.
> >
> > Okay, i agree that is a array of hash : list.class => Array end
> > list.last.cla
On 3 August 2012 13:00, Esmerino Jr wrote:
> Michael Pavling, thanks for reply.
>
> Okay, i agree that is a array of hash : list.class => Array end
> list.last.class => Hash.
> But your solution only removes duplication and the sum of :val ?
I think you need to make it more clear what you are t
Botp, thanks for replay, this is solution:
list.inject(Hash.new(0)) { |hash, el| hash[el[:cod]] += el[:val] ; hash }
I want it out:
{"0006"=>120, "0005"=>17, "0004"=>33, "0002"=>27, "0001"=>22}
Thanks for replay again.
On Fri, Aug 3, 2012 at 8:39 AM, botp wrote:
> On Fri, Aug 3, 2012 at 7:3
Michael Pavling, thanks for reply.
Okay, i agree that is a array of hash : list.class => Array end
list.last.class => Hash.
But your solution only removes duplication and the sum of :val ?
Tom Meinlschmid, thanks for reply.
Not a test for job seekers :)
Solution:
list.inject(Hash.new(0)) { |
On Fri, Aug 3, 2012 at 7:33 PM, Esmerino Jr wrote:
> Thanks for replay, but this solution only remove the duplication of values
> and sum of values duplication?
pls show what output you really want.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Ta
Thanks for replay, but this solution only remove the duplication of values
and sum of values duplication?
Thanks again.
On Fri, Aug 3, 2012 at 8:13 AM, botp wrote:
> On Wed, Aug 1, 2012 at 8:35 PM, Esmerino Jr
> wrote:
> > I have a hash like so:
> >
> > list=[
> > {:cod => "0001", :name => "
On Wed, Aug 1, 2012 at 8:35 PM, Esmerino Jr wrote:
> I have a hash like so:
>
> list=[
> {:cod => "0001", :name => "name1", :val => 10},
> {:cod => "0001", :name => "name1", :val => 12},
> {:cod => "0002", :name => "name2", :val => 13},
> {:cod => "0002", :name => "name2", :val => 14},
>
On 3 August 2012 11:12, sith wrote:
> While running RAILS 3 application in production mode , the development log
> also gets recorded along with production log.It should only give the
> production log right?
Right
Colin
--
You received this message because you are subscribed to the Google Grou
While running RAILS 3 application in production mode , the development log
also gets recorded along with production log.It should only give the
production log right?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group,
Hi
i am new to rails..
can u explain me how do i store data into multiple table from one
form.Explain me with sample code
Also Explain me about association between tables..i studied many
articles .but stil i am confuse.
pls help me
Thanks
Durga
--
Posted via http://www.ruby-forum.c
i found the error
thanks
On Fri, Aug 3, 2012 at 1:55 PM, hanish jadala wrote:
> i have followed rails guid and i got error and i posted in this link
>
>
> https://raw.github.com/gist/3245786/8f7f95d0e980111cbfcccba9e2ecf7b63f6e1f29/test
>
>
> On Fri, Aug 3, 2012 at 12:53 PM, Michael Pavling wrot
i have followed rails guid and i got error and i posted in this link
https://raw.github.com/gist/3245786/8f7f95d0e980111cbfcccba9e2ecf7b63f6e1f29/test
On Fri, Aug 3, 2012 at 12:53 PM, Michael Pavling wrote:
> On 3 August 2012 06:32, honey ruby wrote:
> > Hi everyone i want to test a rails app
On 3 August 2012 08:23, Michael Pavling wrote:
> On 3 August 2012 06:32, honey ruby wrote:
>> Hi everyone i want to test a rails app and i have no idea on testing the
>> rails app. Can any guide me how to test a rails app and what are the best
>> way to test an app.
>
> Have you tried http://www.
saw something similar somewhere as a test for job seekers :)
so don't know if someone will help you as it's not so hard to solve
tom
On Aug 1, 2012, at 15:25 , Esmerino Costa wrote:
> I have a hash like so:
>
> list=[
> {:cod => "0001", :name => "name1", :val => 10},
> {:cod => "0001", :n
On 1 August 2012 15:54, alecx wrote:
> Hello,
> I want to create an google-like app with one search box, where you can send
> a request to different legacy databases.
> And the results of the database requests should be displayed on one site
> with jquery databse tables and flot charts .
> But
On 1 August 2012 02:17, Neil Mowbray wrote:
> Unless I'm being dumb I cannot find anything on Google search or in the
> Rails books on how to create a one-to-one polymorphic association
> (as apposed to a one-to-many polymorphic association).
Change the has_many to a has_one, and you should have
On 3 August 2012 06:32, honey ruby wrote:
> Hi everyone i want to test a rails app and i have no idea on testing the
> rails app. Can any guide me how to test a rails app and what are the best
> way to test an app.
Have you tried http://www.google.co.uk/search?q=test+rails+app
Imagine that each
On 1 August 2012 14:25, Esmerino Costa wrote:
> I have a hash like so:
That's not a hash, it's an array of hashes.
> What I would like to learn how to do is how to remove a record if it is
> duplicate end sum values :val.
list.uniq!
--
You received this message because you are subscribed to
I have a hash like so:
list=[
{:cod => "0001", :name => "name1", :val => 10},
{:cod => "0001", :name => "name1", :val => 12},
{:cod => "0002", :name => "name2", :val => 13},
{:cod => "0002", :name => "name2", :val => 14},
{:cod => "0002", :name => "name2", :val => 14},
{:cod => "0004",
Sounds like you want to look at collection_name on your class.
More here...
http://www.quarkruby.com/2008/3/11/consume-non-rails-style-rest-apis/
On Tue, Jul 31, 2012 at 4:47 PM, Tom Allison wrote:
> Ran into a great problem. REST, as it's implimented via Rails, identifies
> the URL as a p
Hi.
Ruby, first so you can get along with Rails more easily, because in the
first place, Rails is built using Ruby language. ;)
Try Ruby @ tryruby.org that's where I learned the basics of Ruby. ^_^
After that, head on to CodeSchool and try RailsForZombie course, which is
FREE. :)
On Wednesd
Does anyone got it working for Rails 3
On Sunday, 6 September 2009 18:58:19 UTC+5:30, Mark Studebaker wrote:
>
> Have you tried has_many_polymorphs (2.13)
>
> http://m.onkey.org/2007/8/14/excuse-me-wtf-is-polymorphs
>
>
> --
> *From:* Heinz Strunk
> *To:* rubyonrails-t
Folks,
Unless I'm being dumb I cannot find anything on Google search or in the
Rails books on how to create a one-to-one polymorphic association
(as apposed to a one-to-many polymorphic association). New to Rails so
please forgive my ignorance. The situation is simple: I have the
following mode
Hi
I think your model name or controller name misspelled please check first
line of your model or controller.. that should be correct proper name as
you created...
On Wed, Aug 1, 2012 at 11:43 PM, regedarek wrote:
> I can`t figure out why on heroku server my app crashed. On local server
> all
On Monday, September 29, 2008 11:28:53 AM UTC-7, Eric Schulte wrote:
>
> They come from the map.resources lines in config/routes.rb. See
> http://api.rubyonrails.org/classes/ActionController/Resources.html#M000696
> for more information.
>
This link is now invalid, I'm 90% sure the correct locatio
> > How to learn basics of Ruby and make learning interesting? How you all
> > started with Ruby? Whether Ruby first or Rails first?
> >
> I personally started with Ruby first. I like the books from The
> Pragmatic Bookshelf. (pragprog.com)
Ruby first. Rails is a great tool for quickly generatin
Hi everyone,
I don't know how host to Ruby On Rails app in network solution.
I uploaded file in "/var/www/vhosts/default/htdocs/rails/app-name".
I also used haml in my rails application.
Can any one help me :)
Thank You!
Saravanan.P
--
You received this message because you are subscribed
tl;dr: nested attributes isn't setting the belongs_to association
I have these two models right now:
class Organization < ActiveRecord::Base
has_many :groups
belongs_to :main_group, :class_name => Group.name, :foreign_key =>
:main_group_id, :autosave => true
validates_presence_of :main_gr
Hello,
Your class Project does not have a method by the name 'id'. Please review
the logic of your code :-)
On Tuesday, July 31, 2012 2:30:22 PM UTC+3, Ruby-Forum.com User wrote:
>
> I have installed the latest version of rails and jruby. I have copied
> all my files from rails 2.3.5 version an
Hello,
I want to create an google-like app with one search box, where you can send
a request to different legacy databases.
And the results of the database requests should be displayed on one site
with jquery databse tables and flot charts .
But I am having problems to display all the results
I have a hash like so:
list=[
{:cod => "0001", :name => "name1", :val => 10},
{:cod => "0001", :name => "name1", :val => 12},
{:cod => "0002", :name => "name2", :val => 13},
{:cod => "0002", :name => "name2", :val => 14},
{:cod => "0002", :name => "name2", :val => 14},
{:cod => "0004
54 matches
Mail list logo