Displaying 20 results from an estimated 500 matches similar to: "How to have a form within a form?"
2008 May 13
0
assert_no_difference question
I have the following test code:
assert_no_difference Avatar, :count do
a = create_avatar(:description => nil)
assert a.errors.on(:description)
end
further down, create_avatar looks like:
def create_avatar(options = {})
Avatar.create(:description => "Foo Descr.").merge(options)
end
(Borrowed from the user test in acts_as_auth...)
It seems to pass, as my avatar model
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
2010 Jun 09
4
rails+sinatra sent image
Hi!
I have simple rails application - users with name and avatar and in
sinatra I want to create new user.
form for new user
<form action="/users/create" enctype="multipart/form-data"
method="post">
<p>
<label for="name">Name: </label>
<input type="text" id="name" name="user[name]" >
2007 Aug 14
2
AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
Before I chalk this up as a bug and report it, I just want to make sure I''m not
doing something silly.
Running ZenTest''s autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the
following failed test:
ActiveRecord::AssociationTypeMismatch in ''User should create an avatar with
uploaded_data''
Avatar expected, got Avatar
This only happens with that exact
2005 Dec 25
3
SQLite primary key schema
So after successfully getting the test SQLite db to run from memory, I
tried running some tests but found that somewhere in the schema
translation from Postgres (my devel database) and SQLite Rails fails
to properly set the ''id'' column, which breaks all kinds of things.
Take as an example my ''users'' table. In Postgres the schema is
(generated with pgAdmin III):
2001 Feb 12
2
patches for UnixWare v2.x pty (misc.c,configure.in)
I have attached two patches to the current source code. The first
addresses the pty problems with UnixWare 2.x with connecting with
SSH2. It sets the sigaction to SA_RESTART. This fixes UnixWare v2.x,
but haven't heard any feedback as to effects on other OS'.
The first patch is against misc.c.
The second patch adds a section "*-*-sysv4.2uw2*" to configure to
set the
2011 Apr 21
2
Rails 2.3.11 and carrierwave, can't find generator
I added carrierwave to a 2.3.11 app that I have updated with Bundler.
I just tried to use the following:
script/generate uploader Avatar
The following error is coming back:
NOTE: Gem.cache is deprecated, use Gem::source_index. It will be
removed on or after 2011-08-01.
Gem.cache called from /Library/Ruby/Gems/1.8/gems/rails-2.3.11/lib/
rails_generator/lookup.rb:234
.
Couldn''t find
2018 Aug 28
2
IceCast - Is it still being developed?
Hello! I was just wondering if the IceCast platform was still being
actively developed?
Thank you,
Jason
--
_DEFINE YOUR DESTINY IN ULTIMA GENESIS: CALL OF THE AVATAR [1]! PLAY FOR
FREE TODAY._
FOLLOW US ON SOCIAL MEDIA!
[2] [3]
Links:
------
[1] https://titanx.games
[2] https://www.facebook.com/titanxgames/
[3] https://twitter.com/intent/user?screen_name=_TitanXGames
--------------
2008 Sep 02
4
Attachment_fu, Paperclip, & S3
For various reasons, I made a git branch and installed Paperclip in
place of attachment_fu. Paperclip works great except that images seem to
have lost some quality; edges have gone a little too jaggy to be able to
drop attachment_fu just yet. After a post on the Paperclip Google Group,
someone suggested the :convert_options could be passed additional
attributes, like ''quality'',
2018 Aug 29
2
IceCast - Is it still being developed?
Is this the version of "Karl Heyes" with extra features? If not, there
can I find the "Karl Heyes"-version?
Am 28.08.2018 um 23:05 schrieb jake:
>
> https://gitlab.xiph.org/xiph/icecast-server/commits/master
>
> The last commit was a week ago, and it looks fairly active, so.... yes?
>
> On 2018-08-29 05:28, Chernabog wrote:
>
>> Hello! I was just
2010 Aug 07
12
Paperclip Trouble - Not Writing to the Database
Hello all,
I''m a Rails newbie trying to get a basic implementation of Paperclip up
but it''s giving me problems. I''m developing on Windows XP (I know...)
with WEBrick and MySQL.
In my model I have:
class User < ActiveRecord::Base
has_attached_file :avatar,:styles => { :medium => "300x300>", :thumb
=> "100x100>" }, :url =>
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
Basically, I''m trying to crop multiple images out of a remote/original
scene.. Think flickr ''tagging'', only, the pixs in the tagged boxes
become their own unique images.. by way of simulating an upload from
the controller using attachment fu.. can''t quite figure out the
specific method in fu that would allow me to do this.. I''m so near the
edge right
2005 Jan 11
7
default error page
Help, please.
I need redirection to a custom error page, instead of
the default Rails messages (e.g. Unknown action).
I use WebRick, no Apache, and i think i can''t use
public/.htaccess (# General Apache options).
Thanks.
___________________________________
Nuovo Yahoo! Messenger: E'' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica
Scaricalo ora!
2006 Apr 12
1
Doing destructive actions with a GET request
I know that you should always use a POST to perform actions that are
destructive. I intend to break this rule and use a GET, but before I do,
I''d like to know if there is a better way of doing this:-
I have an account edit form for the user to make changes to their profile.
They have to be logged-in to do this. The problem is I have a
file_column field within the form which is storing
2009 Aug 02
1
Provide missing image
Hi
I have an application where people can upload avatar-like images to
the site. When I show the images I want to show a placeholder image if
no image has been uploaded for that user.
I was thinking of overloading the image_tag helper to check for
existance and provide :default => "path/to/default/image" for the
image to show in case the primary one does not exist.
So my questions
2009 Nov 27
1
Cucumber + Paperclip
Hello Friends,
First time I am writing a scenario for uploading images. But some how
things are not working as it should be
The cucumber scenario is
And I attach the file at "/home/user/Desktop/sdasd.png" to "avatar"
And I press "Upload Logo"
But I trace it. its showing up
avatar_file_name: "sdasd.png", avatar_content_type:* "text/plain",*
2011 Aug 13
1
Paperclip - could not find generator.
Hello there,
I installed plugin "paperclip" for working with images, but after
running a command
--
rails generate paperclip user avatar
I am getting error
--
Could not find generator paperclip.
If I will try run a command
--
bundle show paperclip
So I will get
--
/Library/Ruby/Gems/1.8/gems/paperclip-2.3.0
In Gemfile I have
--
gem "paperclip", "~> 2.3"
I
2001 Jan 30
3
dsa_verify signature incorrect
I am building version 2.3.0p1 of openssh on a UnixWare 2.03 system
and am unable to connect with SSH 2. The error I get is:
debug: len 55 datafellows 0
debug: dsa_verify: signature incorrect
dsa_verify failed for server_host_key
The build environment is as follows:
gcc 2.95.1
openssl-0.9.6-beta2
I've looked through the archives and found similar problems related
to version
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,
2008 Dec 04
1
upload test images using rake with populator
I am wondering if it is possible to upload test images to the database
along with the other fake user data. I am using populator along with
faker for fake test data and it is working very well. I am able to do
things like:
User.populate 100 do |user|
user.username = Faker::Name.first_name
user.email = Faker::Internet.email
end
but I am wondering if theres a way to do