Hi
I have to read a logo from DB and set in each page..I ahve a table
named company with a BLOB field company_logo
So i wrote application controller code like
after_filter :logo_set, :except => [:login,:process_login]
private
def logo_set
@logo=CompanySetting.find(3)
send_data @logo.company_logo, :type => "image", :disposition
=>
"inline"
end
And my view has
<%= image_tag("@logo.company_logo", :alt => "Image")
%>
<table border="0" cellspacing="0"
cellpadding="0" align=''right''>
<tr>
..............(other html data)
But what happens is only the image get displayed in browser no
other html data ..Why this happens..Please help
Thanks in advance
Sijo
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Take look at: http://mcubed.name/blog/articles/read/9 On Jul 26, 11:15 am, Sijo Kg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi > I have to read a logo from DB and set in each page..I ahve a table > named company with a BLOB field company_logo > So i wrote application controller code like > after_filter :logo_set, :except => [:login,:process_login] > private > def logo_set > @logo=CompanySetting.find(3) > send_data @logo.company_logo, :type => "image", :disposition => > "inline" > end > > And my view has > <%= image_tag("@logo.company_logo", :alt => "Image") %> > <table border="0" cellspacing="0" cellpadding="0" align=''right''> > <tr> > ..............(other html data) > But what happens is only the image get displayed in browser no > other html data ..Why this happens..Please help > > Thanks in advance > Sijo > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Hi
Thanks for the reply..This I had already tried..Then I get the above
problem..ie Only the image get displayed Not other data in the page
Sijo
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---