Displaying 20 results from an estimated 4000 matches similar to: "Finding a record and showing it -- how?"
2006 Oct 11
2
Help please with observe_form - not working
My observe_form is basically totally limp. I think it should update without
hitting submit button but even if I hit it , it doesn''t change (doesn''t seem
to post the data).
Can anyone please take a look and see if I"m doing something wrong. TIA
Form:
<% start_form_tag({:action => "livesearch"},
:id => "asearch") %>
2006 Jul 08
2
Creating/Saving dependent objects
Folks,
Am new to RoR and am building an example to get myself familiar. I am
running into a simple issue while creating a user registration page.
I have a User and Address models defined as below (partial/relevant code
included below). User has_one address and Address belongs_to user. I have a
foreign key defined in address table that refers to user(id)
In a form I take in username, password,
2007 Jan 18
7
form_tag broken in Rails 1.2 RC2 or is it me?
I''m using Rails 1.2 RC2 and I''ve got a view that uses form_tag and the
form is not being rendered. It''s just not there. My view is this:
<div class="box">
<fieldset>
<legend>Log in</legend>
<% form_tag do %>
<div class="row">
<div class="formfield">
<label
2006 Apr 19
4
Another DRY question
I have some code working that lists only items from a particular user.
The code in my list action finds the user and then conditionally lists
only his/her items:
def list
user = User.find(session[:user])
user_id = user.id
@product_pages, @products = paginate :products, :per_page => 10,
:conditions =>[''user_id = ?'',
user.id]
2007 Oct 05
7
Trouble with text_field_tag
I am trying to implement a basic login page:
login.rhtml
1 <fieldset>
2 <% form_tag do %>
3 <label for="name">Name:</label>
4 <%= text_field_tag :name, params[:name] %>
5 <label for="password">Password:</label>
6 <%= password_field_tag :password, params[:password] %>
7 <%= submit_tag
2006 Oct 12
3
Help with observer_form , javascript error
I''ve set up an observer form, it is not working nor throwing error at least
in loading the page.
The Firefox javascript console is showing this error:
Error: missing } after property list
Source File: http://localhost:3000/ajaxsearch/list
Line: 165, Column: 45
Source Code:
hide(''roller'')}, parameters:''Form.serialize(''asearch'')='' +
2003 Oct 20
3
Call Waiting on SIP phones
Hi All,
This is the first time I'm submitting a patch, and I hope it fixes more than
it breaks. I'm putting it here, since John Todd mentioned a while ago about
the heavy load Mark and crew have at Digium (doing such good work), so I
thought all of us could test this first, and if ok submit for inclusion in
CVS later if appropriate.
This is an extension to work done earlier (sorry I
2005 Jul 19
1
Nested drag and drop rendering issue with ie
First and foremost, excellent library - excellent work. Thank you.
Now, here''s what I''m doing:
<div id="wrapper">
<fieldset id="page_1">
<legend>Page</legend>
<fieldset id="group_1">
Group
</fieldset>
<fieldset id="group_2">
Group
</fieldset>
2008 May 28
3
Newbie: Searcing database via user form input?
Does anyone have a tutorial on adding new parameters to the paramaters
list and then creating find conditions around them?
I''m wondering how I can get my index page to list only the items where
some of the the databases fields match user form input. index.html.erb
would be calling itself with a new parameter :searchdata
So far the index.html.erb has...
<% form_tag({ :action =>
2007 Apr 23
3
getElementsBySelector problem in IE
I''m having this problem with IE and getElementsBySelector, but am a
relative js novice, so quite possible -- likely even -- that I''m doing
something stupid. Either way, a fresh pair of eyes would help.
Basically I''m duplicating a fieldset within a form (so you can upload
more than one photo). [BTW, the fieldsets have a CSS id which relates
to the object id of the
2007 Sep 23
9
Code reviews: my dumb use of acts_as_commentable (newbie)
With the help of several heroes here yesterday I beat my way into a
working solution to adding comments to one or more models in my
application using acts_as_comentable. Great plugin, but my
implementation is lame. I need enlightenment.
I have users who log in. For several views I want to let them add
comments. Enter act_as_commentable which does just this -- it''s
polymorphic, so you
2008 May 04
5
simple Routing Error
Routing Error
No route matches "/user/register" with {:method=>:get}
The URL is http://localhost:3000/user/register
Here is app/views/user/register.rhtml
<h2>Register</h2>
<% form_for :user do |form| %>
<fieldset>
<legend>Enter Your Details</legend>
<div class="form_row">
<label
2006 Aug 07
8
Login form question
I''m using Rails Recipes to create a login form but instead of username
and password, my setup is firstname, lastname, password.
I seemed to be gramatically challenged and not sure how to set up the
parameter list. Can anyone offer up a suggestion.
The book shows the method starting like:
if request.post?
user = User.find(:first, :conditions => [''username = ?'' ,
2009 Feb 15
2
Collapsible Fieldset
Hey there,
(First steps in Ruby and Rails...)
I''m trying to make a fieldset collapsible, like they are, for example,
on many Drupal pages.
What I''ve figuared out is the following:
<fieldset id="addressdata" class="collapsible collapsed">
<legend>
<%= link_to_function("Show/Hide Addressdata") { |page| page[:
2012 Jan 11
4
Observe field with jquery in Rails 3.1
I tries to observe a change in a field with jquery in Rails 3.1 in
order to be able to implement two cascading select boxes.
A a first step I just try to observe a click in a div using jquery
I have the following function in a .js file that is loadedin the head
section (fieldset is the id of a div) and is displaying a view with
the div fieldset
$(document).ready(function() {
2007 Nov 06
2
Why is this view spec failing?
I can''t figure out why I am getting a failure. It renders out fine in
the browser.
<h1>New member</h1>
<%= error_messages_for :member %>
<% form_for(:member, :url => members_path) do |f| %>
<fieldset>
<legend>Member Info</legend>
<p><label for="member[first_name]">First Name:</label> <%=
2007 Sep 06
1
semi-nube help request
just to show i''m not a complete dork: i receive emails from the list through
gmail and i''ve already searched for the answer to this problem and since
i''ve been a member i''ve not received an email about it. Google search
results are mixed at best.
so this is my problem:
i have a form:
<div id="container"
2010 Aug 17
2
[Form] Method POST & PUT problem
Hello,
I have a form that should be a POST method, but Rails insist to put a
hidden field "_method" that has the value "put" does anyone knows why?
Thanks,
David Sousa
Controller: -------------------------------
def new
@user = @current_user
end
-------------------------------------------
View: -------------------------------------
<% semantic_form_for @user,
2006 Jun 26
9
Form Mail
What is the most RoR friendly way of making a form mailer similar to
this php one?
http://tips-scripts.com/?tip=form_mail#tip
Or is it easier just to use the php with RoR?
--
Posted via http://www.ruby-forum.com/.
2006 May 22
2
good practice or waste of time?
I have what I hope is a simple question regarding a security practice
I''ve been using in my first Rails app. I want to know if it''s
worthwhile or if the extra typing isn''t worth it.
I have 3 models that are related to each other.
class User < AR:Base
has_one :library
end
class Library < AR:Base
belongs_to :user
has_many :items
end
class Item < AR:Base