Displaying 20 results from an estimated 6000 matches similar to: "Easy question: need clarification of the form_for idiom"
2009 Oct 20
5
Annoying problem with file_field and paperclip
Hi all,
I have a really really annoying problem that''s driving me nuts with
file_field and paperclip and having to upload images everytime a form is
edited even though the user is quite happy with the currently uploaded
image or loose the previously uploaded image.
This seems to be caused by the rails file_field helper not storing the
data that has been read in from the db in the same
2010 May 26
6
Understanding Form_for
OK, so I''m an absolute noob at Ruby on Rails. I''ve read a lot of
information I can find about form_for and most of them use form_for to
create new items that get saved into the database and can be viewed
later to edit, destroy, etc. In this case, the database will fill up
with whatever the user wrote and I just want my program to have no
information stored.
I''ve been
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
2012 Sep 08
4
dash symbol
In the example below, what is the dash doing between the class
attribute and array:
(field_helpers -
[:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each
do |selector|
--
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
2007 Mar 14
9
file_field doesnt work inside form_remote_for
When I do file_field within a form_for things are fine... but within a
form_remote_for, with nothing else changed, I find that the params
does not even have the element document[uploaded_file] even though it
is definitely present in the HTML source in the form. Obviously the
file upload fails.
Am I missing something? Or has someone else faced this? Or is this a
known bug?
Rajesh
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested.
But, I added some code to that model that I do need to test. Basically,
I need to somehow fulfill the "uploaded_data" property so I can actually
run my tests(otherwise they fail because of validations). The
"uploaded_data" field is what would grab the multipart data from form.
Here
2008 Sep 18
2
Setting up Fleximage
Hello!
I''ve been trying today to setup fleximage to handle photo uploads to a
RoR application by following the tutorial that is provided
(http://github.com/Squeegy/fleximage/wikis/gettingstarted)
Originally, I just dropped in all of the sample code that they provided,
which I copied below this question.
- When I tried to access "new" to upload a new photo, I received an
error
2010 Apr 28
2
Rails - associations help
Hi
I have two models .
Dbase
--------
name
vendor
type
port
defuser - default user name
Users
-------
username
password
email
I need to build an association between these two in that the dbase
model''s defuser needs to be present in the users table. I am from a
relational database background so am trying hard to understand rails
associations.
What should I do to associate the
2008 Oct 18
5
render :update / page.replace_html problem
Hi there,
I have this ajax problem, I''m desparately trying to debug since 1 entire
day now:
The Controller includes:
========================
[...]
render :update do |page|
page.replace_html ''coverletter_part'', :partial =>
''user/applicationfiles/coverletter_part''
end
[...]
The View includes:
==================
[...]
<div
2006 Apr 25
7
undefined method form_for ?
Seems the only issues I ever have with Rails are these bizarre fiddly
little things that make no sense.
Can''t for the life of me understand why I''m getting undefined method on
form_for in a view?
And it''s actually part of the acts_as_authenticated plugin that''s doing
it. But how can it not know about form_for?
--
Posted via http://www.ruby-forum.com/.
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field
= form_for (Clip.new), :html => {:multipart => true} , :remote =>
true , do |f|
= f.hidden_field :user_id, {:value => current_user.id}
= f.text_field :name
= f.text_area :description
= f.file_field :image
= f.submit I18n.t(:add)
generating the html code
<form accept-charset="UTF-8"
1999 Sep 14
2
DBase File locking issues
Hi All,
I am experiencing issues with the use of DBase files on a Samba 2.0.5a
share, that appear to be due to locking problems. Basically, I have
test programs for both DOS and Win32 that does nothing but append
records to a DBase database (DBF/MDX files). If more than one client
PC is appending to this file, data loss occurs. I get random data
loss, with records lost, and index file
2006 Jun 03
3
Migrating from a legacy Dbase app
All,
My company uses Goldmine as its contact/sales opportunity manager.
(Uses Dbase for it''s DB).
I''m trying to get a Rails app to implement the parts of it we actually use.
I''ve been building my Rails app in MySQL. Now I''m need to start
getting data from Goldmine into my Rails app.
What''s the recommended approach?
A one time transfer of data?
2010 Feb 26
2
Routing Error using Paperclip
For some reason I can''t figure out why I am getting a routing error when
I add Paperclip support. I have another test app when similar code is
working.
I created a new test app first without Paperclip support and it was
doing the CRUD operation fine. However when I added Paperclip support I
get the following error?
Routing Error
user_url failed to generate from
2003 Feb 14
2
RODBC connection failed
I am trying to restart on R after 2 months stop. Start with previously
functioning procedure:
"ch<-odbcConnect("dBase Files")"
get
"Warning message:
ODBC connection failed in: odbcConnect("dBase Files") "
I have tried unsuccessfully different working directories.
The only change I see is that I am working with a new login account on
the same machine.
Unable to figure out why a photo attribute of the paperclip plugin is not being passed in as a param
2011 May 20
4
Unable to figure out why a photo attribute of the paperclip plugin is not being passed in as a param
Hello all,
I am trying to implement a feature in my app where a user posts a
message along with an image.
This is something similar to what is there in `www.diasp.org` .
I dealing with a pretty much outdated configuration of Rails 2.0.2 and
Ruby 1.8.7 , both running on Ubuntu 10.04 OS for project specific
purposes.
Initially, I found a problem in finding an appropriate plugin for
paperclip
2006 Aug 02
7
form_for not working with Markaby
I''m playing around with Markaby and I decided to write a little blog app.
I''m running into issues with forms however. If I use form_for the output of
the form gets swallowed. For example:
form_for :article, @article do |f|
f.text_field :title
f.check_box :published
f.text_area :description
f.text_field :pub_date
f.text_area :content
end
gets rendered as an empty form
2006 Oct 13
2
form_for() and name
how can i give name attributes for form_for(), so it will give an output
like <form name="f">. it is because that i need to access the form name
for javascript manipulation.
as far as i know, name can only used in form_tag(), but i currently have
more than 50 forms that built using form_for(). the structure is like
this:
<% form_for symbol, item,
:url => { :action
2007 Dec 28
1
Nested resources form_for problem
Hi,
I have a resource map like this:
map.resources :users do |user|
user.resource :sreg10record
end
So a User is supposed to have (at most) one Sreg10record. The problem
is in the views. I tried following this tutorial:
http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial
which proposes something like:
<% form_for( [@user, @sreg10record] ) do |f|
2010 May 23
1
[Rails 3] Trouble with named routes and form_for
Hi guys,
I''m having trouble getting named routes and form_for to play nicely in quite the way I would expect. Here''s a quick summary of what I''ve got going on:
Named route:
resources :thread, :class_name => "forum_thread"
Controller name:
forum_thread_controller
Model object:
forum_thread
In both my new and edit actions I''m setting up an