similar to: Default Value for date_select helper

Displaying 20 results from an estimated 80000 matches similar to: "Default Value for date_select helper"

2006 Jun 06
1
Default value plugin
I''m releasing a very small plugin that allows you to specify default values for fields in models. Ordinarily, you might do this in your schema, I guess, but then it''s awkward if you need that on a serialized field or need your default values calculated somehow. So you can do something like this: (repeated from an earlier post and the README) class Mixture <
2006 May 03
4
default values
Hello, I''m working with a postgresql table CREATE TABLE elements ( id serial primary key, c1 text default f1(), ... cN text default fN() ); But if I use de lines @element = Element.new @element.save the values that element take are the nextval in the id field and nules in all the other fields. How can I get the defaults? (but without rewriting the
2006 Apr 23
3
ANN: Polygons library + sweet demo
Hello! I''m releasing an extraction from an application I''m currently working on. It''s a small library for dealing with points and polygons, called Polygons. It really just implements some textbook algorithms w/ Prototype-style JavaScript classes. Check it out here: http://polygons.mdaines.com/ The demo on that page (Firefox/Safari only right now) uses the
2006 Jun 02
6
Set instance variable for all actions in the Controller
Can I set an application wide instance variable that is available for all actions...and their views? eg. class ApplicationController < ActionController::Base @current_user = User.find(session[:user_id]) end and everywhere I can call @current_user.id and I can get that object? Even down in the views? I could not get this to work... Thanks in advance, Jeff -------------- next part
2006 Jun 14
2
Can pagination work with caching
I am currently caching a page that indexes blog entries. Paginate was used to break the entries up. Now when you click on next at the bottom of the page it is only reloading the first page. Im hoping, against odds, that someone here knows of a way to make paginate and cache play together. -- Posted via http://www.ruby-forum.com/.
2006 May 31
7
Getting 22 elements
Hello, I''ve done === class HomeController < ApplicationController def index @country = Country.find(:all, :include => "cities") end end === And rhtml is: === <% @country.each do |country| %> <h1><%= country.name %></h1> <% country.cities.each do |city| %> - <%= link_to city.name, :action =>
2011 Jan 04
1
Problem with "date_select" form helper
Hi, I am using "date_select" form helper to select the date. My code is as follows:- <%=date_select("post", "written_on", :prompt => { :day => ''Select day'', :month => ''Select month''}, :discard_year=>true)%> It works. But there is problem with the number of days for each month. The days combobox has populated with
2007 Apr 14
1
how to add class to date_select helper
Hi, I have this helper and would like to add a html class to each of the select box''s it generates, however I have been unable to find a way? <%= f.date_select ''date_of_birth'', :order => [:day,:month,:year], :start_year => 1940, :end_year => Time.now.year, :include_blank => true %> Any suggestions? thanks john -- Posted via
2006 Jun 15
0
Localization of the date_select -helper
I could use some help with translating month names for the date_select helper using gettext. Think my best bet would be to override the ActionView::Helpers::DateHelper.select_month method once gettext is initialized, which is done by a before_filter in ApplicationContext, but have no idea how I would go about that. Any suggestions appreciated, Isak
2005 Nov 14
0
date_select helper error
I have this date select helper: <%= date_select("customer", "dob", :include_blank => true, :order => [:month, :day]) %> I get this error when posting the form: 1 error(s) on assignment of multiparameter attributes The error happens when I take off the :year option. Any clues as to why this maybe happening? Serge
2006 May 22
6
which kind of deployment has the best performance
In the following deployment of web app on ONE pc-based server,running linux,which can support the most amount of concurrent users as well as the shortest latency? 1 apache+mongrel 2 apache+mongrel_cluster 3 lighthttpd+mongrel 4 lighthttpd+mongrel_cluster 5 lighthttpd+fastcgi Thanks charlie -- Posted via http://www.ruby-forum.com/.
2005 Apr 20
1
default date in date_select?
Hi there, I''m new to Rails -- started with this project just about five days ago -- I''m re-building an in-house ordering tool, and it would be handy to pre-populate a date_select field with a value two weeks from now. The calculation isn''t the hard part, it''s getting date_select to pre-populate itself. Any suggestions? Thanks, --Jim
2006 Feb 28
1
RoR date_select() default date
Hi, I''m trying to use the date_select() function of ruby on rails, but I want my form easier to use and I want to put an explicit default date. I don''t kow how to do that. I can''t find any information about default on the web, and no example either. Let me know if there is a tips that I don''t know... -- Posted via http://www.ruby-forum.com/.
2007 Apr 16
0
Default Year selection for date_select?
Hi, is it posible to tell rails to select a specific year/month/day when using a date_select helper? as mentioned in at http://dev.rubyonrails.org/ticket/6124 things like :select_year => 1960 wont work. Where would be a good location to look for such things when the api doesnt show it? Pascal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2007 Oct 13
5
default date for date_select
Hi, How can I set a default date for a date_select? I''m trying to do something along the lines of: <%= date_select("requirement", "target_date", :end_year => 2020, :discard_day => true, :include_blank => true, :order => [:month, :year], :default => {:month => 10, :year => 2012 }) %> but the default that comes up on the form is blank month
2005 Aug 17
2
CumulativeOffset
Hey All, I have a fairly basic question about the prototype.js library. First, I''ve been looking for documentation on this and I have yet to find it. If any of you know of any, please let me know. Since I''m new to both the scriptaculous and prototype libraries could someone explain why I would want to use the cumulativeOffset method and not to just grab the offset off
2006 Jul 24
1
Default in date_select
how to set dafault date in date_select plz explain with example advance thx have a nice day -- Posted via http://www.ruby-forum.com/.
2006 Jun 01
3
more questions: human_name
One more question: Is there some way to set the human_name of a column? e.g.: human_name for column address1 shouldn''t be Address1 but "Address, line 1". If not, should I make a hash with my custom names? Best regards, -- ---------------------------------------------------------------------- Yannick Majoros http://www.inma.ucl.ac.be/~majoros Informaticien UCL/INMA-MEMA
2007 Jan 11
5
how to have default date for date_select
lo there all, i want to have a date_select heper default to the year 2006, but cant seem to find out how to pull it off. any takers ? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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
2005 Dec 15
1
date_select help
I''m trying to select items from a database by their date field. The date data is coming from a form using the date_select helper. The field in the database is named date_notified_on. My controller method is this: def history_date if(@params) @notifications = Notification.find(:all, :conditions => ["date_notified_on = ?",