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
amvis
April 17, 2012, 4:31pm
2
On 17 April 2012 15:06, amvis [email protected] wrote:
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
amvis
April 17, 2012, 6:46pm
3
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…?
amvis
April 17, 2012, 7:57pm
4
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”