Re: [Rails] Doubts on what association to choose

2014-09-23 Thread Colin Law
On 23 September 2014 09:20, Diego Dillenburg Bueno wrote: > I think I know what it is now, but no clue why it happens. > It won't work whenever I open a html tag before <%= form_for @billing do > |billing| %> and close it before <%= f.fields_for :debts do |builder| %> Do you mean you have ?

Re: [Rails] Doubts on what association to choose

2014-09-23 Thread Diego Dillenburg Bueno
I think I know what it is now, but no clue why it happens. It won't work whenever I open a html tag before <%= form_for @billing do |billing| %> and close it before <%= f.fields_for :debts do |builder| %> Anyone ever been through this or something similar? It must be some failure at the applicatio

Re: [Rails] Doubts on what association to choose

2014-09-23 Thread Diego Dillenburg Bueno
Sorry, little typo there. corret is: http://www.github.com/diegodillenburg/codero I typed my name wrong hahaha. @Collin, yeh I have debugparams in my views, which I learned on railstutorial, that's how I somehow identified my problem. Anyway, I think I've managed to find the problem but still tryin

Re: [Rails] Doubts on what association to choose

2014-09-22 Thread Colin Law
On 23 September 2014 07:38, Colin Law wrote: > On 23 September 2014 06:13, Diego Dillenburg Bueno > wrote: >> Thank you very much for the attention, guys! >> I think I have nailed the association modelling. And as of the debt >> relationship. It would be like: Someone pay for a bill(creditor) for

Re: [Rails] Doubts on what association to choose

2014-09-22 Thread Colin Law
On 23 September 2014 06:13, Diego Dillenburg Bueno wrote: > Thank you very much for the attention, guys! > I think I have nailed the association modelling. And as of the debt > relationship. It would be like: Someone pay for a bill(creditor) for many > other people(those are debtors), that's why I

Re: [Rails] Doubts on what association to choose

2014-09-22 Thread Vivek Sampara
Diego , Is the link working ? im getting a 404 error from github that repo does not exist. Regards Vivek On Tue, Sep 23, 2014 at 10:43 AM, Diego Dillenburg Bueno < diegodillenb...@gmail.com> wrote: > Thank you very much for the attention, guys! > I think I have nailed the association modelling.

Re: [Rails] Doubts on what association to choose

2014-09-22 Thread Diego Dillenburg Bueno
Thank you very much for the attention, guys! I think I have nailed the association modelling. And as of the debt relationship. It would be like: Someone pay for a bill(creditor) for many other people(those are debtors), that's why I need to have 0, 1 or multiple debtors in one billing. That's where

Re: [Rails] Doubts on what association to choose

2014-09-22 Thread Jason Fleetwood-Boldt
Diego, You actually have a very good question here. I don't quite see all the foreign keys here, and I only grok 75% of your specific data model, so I will answer your question generally and give you some options rather than specifically tell you how to do it. You probably read that the rails

Re: [Rails] Doubts on what association to choose

2014-09-21 Thread Timothy Mukaibo
Hi Diego, You're correct when you say you can add the logic for a has_many / belongs_to (which is a one to many relationship), but as far as I'm aware, you need a has_many :through for adding logic to a many-to-many relationship. Good luck with the internship! Timothy. On 22 September 2014 12:37

Re: [Rails] Doubts on what association to choose

2014-09-21 Thread Diego Dillenburg Bueno
Won't I be able to add the logic I need for debts using has_many belongs_to? Basically all that I would need is to gather which debts I(as the user) have and be able to(in future) toggle their 'paid/unpaid' status. Or would it be better to have a relationship table? via has_many through? As of the

Re: [Rails] Doubts on what association to choose

2014-09-21 Thread Timothy Mukaibo
Assuming a single creditor and multiple debtors for a single billing, you will need a one to one relationship for the creditor -> billing (belongs_to on the billing, as you have done), but a many to many relationship for debts -> users. Generally, it's better to implement the many-to-many as a has

[Rails] Doubts on what association to choose

2014-09-20 Thread Diego Dillenburg Bueno
Hello everyone, I'm a beginner Rails developer and right now am building a sample project to show off at some job apply. The app is rather simple, I guess, but I have come to some doubts on what associations to chose and why. Basically a User can create a bill(being its creditor) and the billing

Re: [Rails] doubts with link_to function

2011-12-09 Thread Tim Shaffer
"report_listing_path will return the path to whatever route you have defined as "report_listing" You can run "rake routes" from the command line to see which routes you have configured in your application. -- You received this message because you are subscribed to the Google Groups "Ruby on R

Re: [Rails] doubts with link_to function

2011-12-08 Thread amvis
i have look this http://guides.rubyonrails.org/routing.html. but i didn't get one thing. lets take one example * <%= link_to "Loyalty Report", report_listing_path(@listing, :format => "csv") . *so what i am seeing the above link is new_photo_path returns */photos/new.*so if it like dis th

Re: [Rails] doubts with link_to function

2011-12-07 Thread Leonardo Mateo
On Wed, Dec 7, 2011 at 7:26 AM, amvis wrote: > > i have seen one link_to function, but i didn't get the path flow. which >  written in that function. PLZ any one clear dat  function > > <%= link_to "Loyalty Report", report_listing_path(@listing, :format => > "csv") unless @listing.parent %> What

[Rails] doubts with link_to function

2011-12-07 Thread amvis
i have seen one* link_to* function, but i didn't get the path flow. which written in that function. PLZ any one clear dat function *<%= link_to "Loyalty Report", report_listing_path(@listing, :format => "csv") unless @listing.parent %>* * * * * Thank you vishnu -- You received this message

Re: [Rails] doubts

2011-11-11 Thread Phil Dobbin
On 11/11/11 13:18, "Colin Law" wrote: > I don't think I have ever seen REQUIRE, LOAD, EXTEND or INCLUDE in a rails > app. Looks like a cross between PHP, MySQL & some kind of shell doings in the wrong case... Cheers, Phil... -- Nothing to see here... move along, move along -- You rece

Re: [Rails] doubts

2011-11-11 Thread Colin Law
On 11 November 2011 12:36, samar kuamr mishra wrote: > what is > -REQUIRE > -LOAD > -EXTEND > -INCLUDE >                in rails . plz send me with appropriate example . I don't think I have ever seen REQUIRE, LOAD, EXTEND or INCLUDE in a rails app. Colin -- You received this message because

Re: [Rails] doubts

2011-11-11 Thread Michael Pavling
Reads like a homework question to me... On 11 November 2011 12:36, samar kuamr mishra wrote: > what is > -REQUIRE > -LOAD > -EXTEND > -INCLUDE >                in rails . plz send me with appropriate example . -- You received this message because you are subscribed to the Google Groups "Ruby o

Re: [Rails] doubts

2011-11-11 Thread Phil Dobbin
On 11/11/11 12:36, "samar kuamr mishra" wrote: > what is > -REQUIRE > -LOAD > -EXTEND > -INCLUDE > in rails . plz send me with appropriate example . Try for further information. Cheers, Phil... -- Nothing to see here... move along, move along

[Rails] doubts

2011-11-11 Thread samar kuamr mishra
what is -REQUIRE -LOAD -EXTEND -INCLUDE in rails . plz send me with appropriate example . -- 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 unsubscri

[Rails] doubts in running a sample web application

2008-12-14 Thread Angappan Ayyavoo
Hai Iam newbie. Iam using ruby on rails, I have some doubts in it. The steps i followed is Using ruby 1.8.6 rails 2.2.2 http://www.ibm.com/developerworks/linux/library/l-rubyrails/ 1) created the rails project name 2)created the table name contacts in the addressbook database name in Mys