plz see this http://pastie.org/878267 reply if u find any error or suggestion.. plz its urgent Regards, Shyam +91-9716-18-9650 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Mar 20, 2010 at 1:09 AM, shyam mohan <shyammohankanojia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> plz see this > http://pastie.org/878267 > reply if u find any error or suggestion.. > plz its urgent > > > Regards, > Shyam > +91-9716-18-9650 > >Shyam, local variables are not accessing within the view. Thus, you''ll need to change charges = Charge.find(:all,:conditions =>"company_id =#{comp_id}") to @charges = Charge.find(:all,:conditions => [ "company_id = ?" , comp_id ] ) Next, I would recommend reading "Agile Web Development with Rails 3rd" as well as the guides.rubyonrails.org. Good luck, -Conrad --> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Conrad Thanks for replying but problem was some thing else.. thanks Regards, Shyam +91-9716-18-9650 On Sat, Mar 20, 2010 at 2:06 PM, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Mar 20, 2010 at 1:09 AM, shyam mohan <shyammohankanojia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> plz see this >> http://pastie.org/878267 >> reply if u find any error or suggestion.. >> plz its urgent >> >> >> Regards, >> Shyam >> +91-9716-18-9650 >> >> > Shyam, local variables are not accessing within the view. Thus, you''ll > need to change > > charges = Charge.find(:all,:conditions =>"company_id =#{comp_id}") > > to > > @charges = Charge.find(:all,:conditions => [ "company_id = ?" , comp_id ] ) > > Next, I would recommend reading "Agile Web Development with Rails 3rd" as well > > as the guides.rubyonrails.org. > > Good luck, > > -Conrad > > > > -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 20 March 2010 08:09, shyam mohan <shyammohankanojia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> plz see this > http://pastie.org/878267 > reply if u find any error or suggestion.. > plz its urgentYou have <td><%=h charge.name %></td> Where is the variable called charge setup? You might like to have a look at rails guide on debugging, it will show you several ways of analysing this sort of issue when you cannot see the problem by code inspection. http://guides.rubyonrails.org/ Look particularly at the use of ruby-debug. 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Mar 20, 2010 at 3:01 AM, shyam mohan <shyammohankanojia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Hi > > Conrad > > Thanks for replying > but problem was some thing else.. > thanks > > > Regards, > Shyam > +91-9716-18-9650 > >Did you resolve the issue? -Conrad> > > On Sat, Mar 20, 2010 at 2:06 PM, Conrad Taylor <conradwt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On Sat, Mar 20, 2010 at 1:09 AM, shyam mohan <shyammohankanojia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> > wrote: >> >>> plz see this >>> http://pastie.org/878267 >>> reply if u find any error or suggestion.. >>> plz its urgent >>> >>> >>> Regards, >>> Shyam >>> +91-9716-18-9650 >>> >>> >> Shyam, local variables are not accessing within the view. Thus, you''ll >> need to change >> >> charges = Charge.find(:all,:conditions =>"company_id =#{comp_id}") >> >> to >> >> @charges = Charge.find(:all,:conditions => [ "company_id = ?" , comp_id ] ) >> >> Next, I would recommend reading "Agile Web Development with Rails 3rd" as well >> >> as the guides.rubyonrails.org. >> >> Good luck, >> >> -Conrad >> >> >> >> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 20 March 2010 10:08, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> You have > <td><%=h charge.name %></td> > > Where is the variable called charge setup? >I think in the cherry-picking of code to put into pastie, an "each" line was missed out around here: <% charges = params[:charges] if charges %> <td><%=h charge.name %></td> But the upshot is; if you are populating "charges" from the params hash, what is in params? I''d put money on params[:charges] returning an array of integers that are ids of charges (hence getting "undefined method `name'' for "41":String" as the error). If you want "charges" to be a collection of Charge objects that match the ids in params[:charges] - get that all sorted in the controller. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.