Displaying 20 results from an estimated 4000 matches similar to: "Overriding or changing HTML generated by date_select?"
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|
2012 Aug 13
9
Using Jquery plugin "tokenInput" with rails
Hi,
I made a contact manager app using rails. I added TokenInput plugin to
introduce an instant contact search functionality in it. Tried following a
railscast http://railscasts.com/episodes/258-token-fields but have been
struggling with it for a while. Following is the code I use in my view
<%= form_tag({:action => ''show'', :id => @contact_tokens}, :remote =>
2010 Feb 09
2
undefined method `generate_token'
Hi Everyone...
I''m following a railscast episode on how to implement an invitation
feature.
It''s going really well, but i''ve hit a minor snag that I cant get
over..
undefined method `generate_token'' for #<Invitation:0x2563bf8>
The invite form allows me to check for a user, and whether they
already have registered. If they have, the invitation is not
2011 Jul 11
39
Help filling out a registration (I think it's called multi tenant)
Do you know when you are filling out a registration for a new account, and
you keep pressing next to fill the rest of the information in separate
pages?
I''d like to do that, but I have no idea how.
Basically I have a company model with its information, and a contacts model,
with belongs to my company (also each company has only one contact), and I''d
like for the user to fill in
2010 Feb 10
16
nil object - can anyone help?
Hi there,
I''ve been looking for a while now and can''t seem to find where I''m
going wrong..
I''m following a railscast tutorial to send invites out to people.
there''s n invitation.rb page:
class Invitation < ActiveRecord::Base
#attr_accessible :sender_id, :recipient_email, :token, :sent_at
belongs_to :sender, :class_name =>
Overriding date_select in local project to use custom value rather than blank for starting option...
2005 May 08
3
Overriding date_select in local project to use custom value rather than blank for starting option...
I would like to have a date control on a page and I would like a
behavior similar to what you get using date_select with the
:include_blank => true option where the first value in the dropdown is
"- Month -", "- Day -", or "- Year -" rather than a blank value for
the respective month, day, and year select fields.
I took a look at the ruby source for
2009 Aug 24
8
overriding .blank? method
Hi,
Does anyone know a way to override .blank? method that rails provides.
I want to add additional custom checks (specific to my application) to
this method.
Thanks,
Pratik
2009 Nov 17
6
after changed the tag i got the same eror
SyntaxError in Upload#index
Showing *app/views/upload/uploadfile.rhtml* where line *#10* raised:
compile error
app/views/upload/uploadfile.rhtml:10: syntax error
Extracted source (around line *#10*):
7: <% end %>
Trace of template inclusion: app/views/upload/uploadfile.rhtml
RAILS_ROOT: /home/malathi/www/upload
Application Trace <http://localhost:3000/upload#> | Framework
2012 Feb 01
12
date validation in rails 3
consider scenario,
User model with name, birth_date fields (here birth_date is not mandatory
field)
inside view form birth_date is assigned as ''31/31/1985'' which is invalid
ideally user object should be invalid and while save raise an error on
birth_date field but that''s not happening and user object gets saved with
birth_date as blank which is completely misleading.
2011 Mar 07
4
Railscasts down?
I have not been able to get railscasts.com recently, surely it has not
been taken down also, along with the wiki.
Colin
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2011 Nov 05
13
Adding a site admin user while creating a site
Hi Gurus,
I wanted to add siteadmin user(basically a user with a certain role) while
creating the site itself. I hope that i have done all the necessary stuff
by going through raynb''s railscasts (
http://railscasts.com/episodes/196-nested-model-form-part-1) But could not
see user fields being displayed in the site creation form.. Below are the
details.
I Have two model users and
2006 Jan 19
2
date_select broken
I am using date_select and in some instances it only shows about 10
years worth of choices. Same form on other users shows the whole
range. date_select looks like this
<%= date_select ''user'',''birthdate'' , :start_year => 1940 %>
I would expect to always see 1940-2006 or so , but i dont always do.
Is there a way to force the range or explain why i
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi,
I''ve looked on api.rubyonrails.org but I''ve not found how to add to a
date_select(object, method, options = {}) a class option to set the
class of all the select tags.
I''ve tried using "class" => "myclass" in thoose ways:
<%= date_select("costo", "data", "class" => "testo" ) %>
<%=
2007 Jun 13
3
date_select css options
Just looked at the Date helper in the rails API and noticed that none
of the functions there (i.e. date_select) allow me to specify html
options (i.e. class) for the generated selects.
I was wondering how do other group members css format date select
dropdowns?
Best,
Gabor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2006 Nov 04
2
date_select parameter
Trying to add start year to date_select
<%= date_select(:start_year => 1980)%>
It''s throwing an exception "wrong number of arguments (1 for 0)
Can''t I add a start_year, API shows this option ?
TIA
Stuart
http://en.wikipedia.org/wiki/Dark_ambient
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2006 Jan 07
4
set date with date_select
when retreiving a date from a DATETIME field in a database, is there a
way to set the date to the value of the DB in the view? It seems to
always default to the current date...
if I have a field called birthdate in the users table and i do
@user = User.find(@params[:id])
in my view i have a <%= date_select ''birthdate'',''user'' %>
but dont know how to
2010 Jul 31
5
date_select Year as a text_field
Hey all,
Using date_select in a form, how can I make the Year field a
text_field instead of a select? It looks like it will take more than a
simple modification of the date_select method.
Thanks in advance.
Cam
--
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
2009 Jul 31
8
Would like include model association in to_xml
i have:
class Library << ActiveRecord::Base
has_many :books
end
class Book << ActiveRecord::Base
belongs_to :library
end
in my controller i have:
render :xml=> Library.find(:all).to_xml(:include=>books)
but, i would like put a condition in the books ( e.: pages >= 100 )
i would like to create a xml with all Libraries, but books with pages more
than 100)
How to
2010 Jan 03
9
ferret search in production
Hi there,
after recently deploying my app, I have noticed that the search
results are not being displayed...
When I look in my app, I also notice that the apps content (search
criterea) is not being indexed, so I dont have an index folder being
created.
I read on a google post that it may be that the ferret.yml server
isn''t started (or perhaps the content of this file are not right)
I
2006 Jul 26
2
text_field and date_select in collection
hello,
i would like to display a collection of records on one page (e.g. an
author record with all his/her books).
a record contains a text_area (e.g. a description of the book) and a
date_select (e.g. when the book was published).
<% for @book in @author.books %>
<%= text_area ''book[]'', ''note'' %>
<%= datetime_select