Displaying 20 results from an estimated 10000 matches similar to: "form_for scope issue"
2006 Nov 04
0
Re: form_for scope issue RESOLVED
Feurio or anyone else,
I saw your post about your request for a ticket to the RailsConf Europe.
Your e-mail box was full therefor this message.
I have a ticket for sale!!!
Regards,
e.reijenga at inxights dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060912/a5697f66/attachment.html
2006 Jul 17
6
Rails+Mongrel+Lighthttpd: Ruby-Sendfile Problem
Hello,
I have a working mongrel cluster and want to use Lighty as the frontend
webserver. I want ligthttpd to deliver the static content.
So I did
gem install sendfile --remote
Everything installed.
But if I run the tests like
gem check sendfile --test --debug
i get the following error message:
Exception `Errno::ENOSYS'' at ./test/test_sendfile.rb:75 - Function not
implemented -
2006 Apr 15
0
form_for, partials, and rjs
Hi there!
Im trying to use rjs templates to add form fields to an existing form.
So for example a user could fill out a form and optionally hit a
link_to_remote and get another set of identical fields to fill before
sending. This would mean he/she could add ex. more than one record in
the same form.
The original form was rendered with form_for and using a partial:
<% form_for :example,
2009 Feb 06
2
Using partials with form_for
hi all
i was wondering whether it is possible to use partials along with form_for
and form_field. following code is not working. is there some error or this
case is impossible..??
*#new.html.erb*
<h1>Enter Details for new Partner:</h1>
<% form_for(@partner) do |f| %>
<%= render :partial => ''form'', :locals => {:partner => f} %>
<p>
2007 Apr 13
1
How can I use aggregation objects in form_for?
Say I have a person object which has a aggregation object call
address. The the code to manipulate a form for create a new person
should be:
# new.rhtml
<% form_for :person, :url => {:action => ''create''} do |f| %>
<%= render :partial => ''form'', :locals => {:f => form} %>
<%= submit_tag "Create" %>
<% end %>
2006 Aug 05
1
form_for and partials
I''m getting an error in the partial when i try
<% form_for :name do |form| %>
<%= render_partial "#{@current_stage}" %>
<% end %>
So I assume that form_for does not have scope in the partial?
If that is the case what are my solutions...
Do I have to stick a <% form_for in every partial, or do i just change all
my inputs back to text_field
2002 Nov 21
0
dbPowerAMP, CDex / Re: Freeware windows ogg audio CD bur ner?
There's another nice Windows program in the pipeline: Feurio 2.0
(www.feurio.de) will have OggVorbis and MonkeyAudio support.
Feurio is a all-in-one solution for CD ripping/burning specialized on
audio CD.
Feurio supports high speed, high-quality on-the-fly ripping and
encoding, and on-the-fly decoding/burning, too.
Feurio supports allmost all available CD writers, and there is a
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 Mar 24
0
form_for with nested shallow route
Let''s say I have:
map.resources :teams do |team|
team.resources :squads, :shallow => true
end
When I want to generate a form_for a squad, I need both the team and
squad for new/create, but only the squad for edit.
This means I need:
edit:
form_for(squad)
new:
form_for([team, squad])
This seems not very dry. Is there a more idiomatic way of doing this?
Right now,
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
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
2007 Sep 25
21
form_for and partials
I love form_for, but I really hate
<% form_for :person, @person, :url => {...} do |f| %>
...
<%= render :partial => ''form'', :locals => {''f'' => f}
...
<% end %>
I''ve been thinking of instead allowing
<% form_for :person, @person, :url => {...} do |f| %>
...
<%= f.partial ''form''
2009 Jul 01
1
form_for resources with :singular specified
I fully suspect that I''m missing the point here somewhere so I promise
I won''t be offended if you tell me I''m being daft.
My application rents equipment ... not equipments. So I have the
following:
map.resources :equipment, :singular => :equipment_instance
class Equipment < ActiveRecord::Base
class EquipmentController < ApplicationController
The
2006 Jul 11
0
Arbitrary elements in form_for?
I would like to use form_for in my project so that I can easily change
the style of many forms at once. However, it seems to me like
FormBuilders only support certain kinds of form elements(!). Surely
there must be a way to add arbitrary labels/form elements to a form.
Let''s say I had a form that looks like:
ID: (plain-text label)
Name: (text field)
Birthdate: (date chooser)
Picture:
2010 Feb 07
0
using form_for in a partial
Hello,
I would like a user to fill out a form (a long contract) and then email
it to them, including the new values.
So I was leaning towards a partial or layout so I didn''t have to write
the contract twice. But that''s where I run into problems. The only
difference between the form (contract) and the email are the form tags
will be replaced with their actual values. For
2006 Aug 11
2
Accessing belongs_to objects from a form_for context
In a form_for context, is there a way to access objects that are related
to the primary object with a belongs_to? I think an example will serve
best:
class User < ActiveRecord::Base
belongs_to :person
attr_accessor :username
end
class Person < ActiveRecord::Base
has_one :user
attr_accessor :first_name
end
<% form_for :user do |form| %>
<%= form.text_field
2009 May 07
3
Add class to "form_for"
Hi,
How can I add a class to a form generated thus:
<% form_for :applicant, :url=> {:action => "index"} do |f| %>
I tried:
<% form_for :applicant, :url=> {:action => "index"}, :class => ''test'' do
|f| %>
but this didn''t work.
Thanks for your help.
--
Posted via http://www.ruby-forum.com/.
2010 Feb 22
1
form_for redirect to another controller
I have 2 controllers foo, bar and I''m using searchlogic gem to search
products inside both controllers. All works great but I want to
implement now custom form_for from foo view to search products for bar
controllers, how to do this ?
I try something like this:
<% form_for @search, :url => {:controller => "bar", :action => "index"}
do |f| %>
but its
2007 Jul 31
1
form_for - over riding the controller that generates the form
Hello,
I am trying to install my login and search forms as default parts of
the layout. This is the code I am using:
<% form_for :user, :url => {:action => ''authenticate''} do |f| %>
<p>Username:<br /><%= f.text_field :username, :size => 30 %></p>
<p>Password:<br /><%= f.password_field :password, :size => 30
2009 May 26
1
how does form_for and validate_presence_of work hand in hand
when we have validate_presence_of :name in the model and then when we
put in the create action that we re-render ''new'', then the form_for will
populate the fields, and error_messages_for ''story'' will have the
correct error message.
this is really great, and and the same time, this looks like magic... i
found that many books don''t explain how the magic