Displaying 20 results from an estimated 40000 matches similar to: "doubt on image_tag"
2013 Mar 09
2
Default image_tag folder
Hey, guys. In documentation i read: "By default, files are loaded from
public/images". I add for example <%= image_tag "logo.gif" %>
When i check html code in browser i see next: <img alt="Logo"
src="/assets/public/images/logo.gif">. Why folder assets? The default
should have been <img alt="Logo"
2010 Dec 22
0
image_tag and send_data
i''m storing images in database.
i have this action in controller:
def image
begin
item = StoredItem.find(:first, :conditions => {:id =>
params[:id]})
rescue
return
end
return if item.nil?
if item.image_binary.nil?
render :nothing => true
else
send_data(item.image_binary, :type => item.image_datatype,
:disposition =>
2009 May 21
1
[PATCH server] Updated look and feel for empty grid views
When empty grids are shown (ex: no VMs in this pool) a specific graphic, message and improved action button are shown. For Task views, the user will see the current filter and an explanation that no tasks match that filter.
Signed-off-by: Jeremy Perry <jeremy.perry at redhat.com>
---
src/app/views/hardware/show_hosts.rhtml | 11 ++++-------
src/app/views/hardware/show_storage.rhtml
2011 Aug 07
2
PROBLEM WITH PAPERCLIP
hello,
i am trying to upload a image file ...using paperclip in rails 3
i did as follows
1. In gemfile => included gem paperclip
2.In config/environments /development.rb => Paperclip.options[:command_path]
= "/usr/bin/" (convert path)
3.created a controller *picusers *and defined => def create
@picuser = Picuser.create(params[:picuser])
end
4.created a model *picuser
2013 Jun 05
1
Link_to image_tag popup
Hello All,
How can I add a popup in link_to image_tag?
I am trying as :-
<%= link_to image_tag(@user.avatar.url(:small)), ''/users/edit'',
:popup=>[''original_image'', ''height=700,width=900''] %>
It goes to the edit page. But it doesn''t opens popup.
Is this the correct way to call a popup?
How can I achieve this?
Thanks,
2010 Sep 15
5
Hide an image in show.html.erb
I have the following "show.html.erb" script, and I get as an output TWO
images since I use a method to draw an image.
How can I HIDE the RESOURCE image?
Thanks.
Here is the script:
<canvas id="line" height="512" width="512">
</canvas>
<p id="notice"><%= notice %></p>
<p>
<b> Name </b>
<%=
2011 May 25
0
Issues implementing jquery-form plugin for displaying image via an ajax call in my rails poc
Hello all,
I am trying to implement a POC wherein I can post a message + image and
get the same working via AJAX to display them both for each new entry
without the page reloading.
I am using a config of Ruby 1.8.7 and Rails 2.0.2 for project specific
purposes.. I am also using a pretty old paperclip commit from github for
this....I had to suit my proj config requirements mentioned previously..
2011 Sep 09
9
Captcha conception
Hi guys, the next problem:
I create a controller, (/controllers/rmagick_controller.rb), which have
aim to test an captcha
Actions:
def download # creates an captcha image
def show # show the page where image took place
def check # must check right captcha or wrong
views/rmagick/show.html.erb:
> <div id="captcha">
> <p><%= image_tag download_rmagick_path
2011 Mar 23
0
Implementing auto complete for more than one field in Rails
Hi,
I have an app, which implements a group feature. Each group has n
members. Also, each group has a group specific profile pic to it.
I have been able to implement auto complete for the group feature
keeping in mind the group name alone. I have referred to the following
tutorial for the same:- http://railsforum.com/viewtopic.php?id=23188
I am using **ruby 1.8.7** and **rails 2.0.2** for
2011 Dec 26
1
Learning Ruby on Rails 3.1 - deployment - Error (cs.jpg isn't precompiled)
Hi guys,
I''ve followed the Agile Web Development with Rails book and I''m up to
deployment. I started a Ubuntu 10.1 LTS server on Amazon EC2 for
testing, got Apache 2, mysql, rvm, ruby 1.9.2, rails 3.1 and phusion
passenger up and running as per the book.
When I come to running the actual site, it says "We''re sorry, but
something went wrong."
In
2011 Feb 02
0
Converting rails 2 to 3 remote_function error
I''m still very new to RoR and had built a site for a friend. I''m now
trying to port it to version 3 and am having an issue with
remote_function.
Right now, in a layout file, I have an image_tag and for :onclick I am
using the following:
:onclick => remote_function(:url => { :controller => ''rcg'', :action =>
''nav_click''}, :with
2011 May 06
3
Rails 3 Routing problems
I have an UploadsController and UsersController where Users''
has_many :uploads'' via polymorphic attachment in uploads.rb.
Now we i navigate to http://localhost:3000/users/1/uploads
I get re-routed to Uploads#index and rendered is called multiple times
as shown below:
Started GET "/users/1/uploads" for 127.0.0.1 at 2011-05-06 22:00:38
+0100
Processing by
2005 Dec 16
5
Question: image_tag(source, options = {})
image_tag(source, options = {})
Ok, when I want to use an image I added the following code:
<%= image_tag "dsf.jpg" options = {[align="right", style="padding-right:
10px; padding-top: 5px;"]} %>
However, this doesn''t seem to work, it doesn''t like how I have the
"options" part setup. I''m sure there is something very easy
2010 Feb 17
1
Paperclip and viewing images
I have two objects Task and Asset and I want to view image in show task.
Here is my to models
Task.rb
has_many Assets :as => :attachable
And
Asset.rb
has_attached_file :photo, :styles => { :large => "371*251>", :small =>
"72*72>"},
:url => "/assets/:id/",
:path =>
2012 Mar 20
4
Multiple Paperclip Images on Index
Hi,
I am working on a project that is using Paperclip to upload multiple
images to an Asset model. my Post model has_many Assets. As per this
tutorial/screencast...
https://github.com/Emerson/Multiple-File-Uploads-with-Paperclip-and-Rails-3/blob/master/app/views/posts/show.html.erb">
http://www.emersonlackey.com/article/paperclip-with-rails-3>
This all works fine and I can
2007 Aug 13
1
link_to image_tag puts a box round my image
I''ve got a rather long conditional statement that either displays a
link_to(image_tag(blah)blah) or just an image_tag (i''ve edited it a bit
to show the structure):
<%= (article.score_from_user(:user_id => session[:user]) != -1)
?
(link_to image_tag("/images/down_arrow_grey.jpg", :alt => "down"),
:controller=>"article", :action =>
2008 Oct 17
1
link_to + image_tag
i want to integrated link_to with image_tag
before i did link_to with image_tag like this
<%=link_to image_tag(image.filename
2011 Aug 27
5
image override*
Hi Team,
I have create one ruby on rails application ,i have one issue for
that image upload ,the image will override the some user , so any can solve
the issues
************************
contoller
class PhotosController < ApplicationController
# GET /photos
# GET /photos.xml
def index
@photos = Photo.all
respond_to do |format|
format.html # index.html.erb
2009 Oct 25
3
Image_tag Positioning/Alignment
Hi:
I searched the forum before posting and could not find any help on how
to position an image using image_tag (''image_name'').
I have an image in a div, and I need to move it to the right.
How do I this? I have this code:
<div id="mainDivright"><%= image_tag (''name.gif''), :options =>
{:align=>"right" } %></div>
I
2006 Jul 03
0
image_tag refuses to work in email context
I have a model called ImageMailer derived from ActionMailer.
It contains a method called sent that takes some args and send email to
a recipient. Works fine. I am testing this in script/console.
I now want to start sending HTML email.
Content type is "text/html".
I can successfully deliver HTML email using the template "sent.rhtml"
thusly: