i have one controller *class UsersController < ApplicationController* * * * def home* * @business_name = return_value["business"]* * puts "business_name.....#{@business_name}" * * end* *end* * * and in *home* folder i have one view branch.html.erb.....My problem is, when i display this <%=*@business_name %>* in branch.html.erb, i didn''t get anything... What is the issue in this view....? Thank you vishnu -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/-53giKvE2-gJ. 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 17 April 2012 15:06, amvis <vgrkrishnan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i have one controller > class UsersController < ApplicationController > > def home > @business_name = return_value["business"] > puts "business_name.....#{@business_name}" > end > end > > and in home folder i have one view branch.html.erb.....My problem is, when i > display this <%=@business_name %> in branch.html.erb, i didn''t get > anything... > What is the issue in this view....?Does the puts command show a name? Change the display line to something like <%= "Name = #{@business_name}" %> which will let you check that the line is being shown. Have a look at the html to see if there is anything there where business_name should be displayed. View > Page Source or similar in your browser? 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> > i have one controller > > class UsersController < ApplicationController > > > > def home > > @business_name = return_value["business"] > > puts "business_name.....#{@business_name}" > > end > > end > > > > and in home folder i have one view branch.html.erb.....My problem is, > when i > > display this <%=@business_name %> in branch.html.erb, i didn''t get > > anything... > > What is the issue in this view....? > > >Does the puts command show a name? >yes this * puts "business_name.....#{@business_name}"* shows the business name, also check the *<%= "Name = #{@business_name}" %>, and page source *but not showing the business_name.....?>Change the display line to something like > ><%= "Name = #{@business_name}" %> > >which will let you check that the line is being shown. > > >Have a look at the html to see if there is anything there where > >business_name should be displayed. View > Page Source or similar in > >your browser? > > Colin > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/jd5Rr3QA-sgJ. 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.
Your folder structure does not seem right. You should not have a "home" folder. You should have a "users" folder with a "home.html.erb" On Tuesday, April 17, 2012 10:06:30 AM UTC-4, amvis wrote:> > i have one controller > *class UsersController < ApplicationController* > * * > * def home* > * @business_name = return_value["business"]* > * puts "business_name.....#{@business_name}" * > * end* > *end* > * > * > and in *home* folder i have one view branch.html.erb.....My problem is, > when i display this <%=*@business_name %>* in branch.html.erb, i didn''t > get anything... > What is the issue in this view....? > > > Thank you > vishnu >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/YAI1E8Dh9FwJ. 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.