Displaying 20 results from an estimated 700 matches similar to: "AM/PM select"
2006 Jan 03
3
render :partial stops setting local variables.
I''m not sure what happened, or what change has caused this to happen, but
render :partial (or any render for that matter, doesn''t seem to let me set
local variables via the local_assigns argument hash.
for example
<%= render :partial ''edit'', :username => @user.username %>
used to allow that username was a local variable in my _edit.rhtml partial
2006 Mar 02
6
Newb question about facade columns
Hello,
I am trying to deal with a database table that contains a date in the
form of the number of seconds since epoch. Data is inserted in this
format by an existing script that I can''t change, so a schema change
isn''t realistic.
I would like to allow humans to view and edit this data in the form of
an actual human-readable date. I figured a facade column would be the
2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0
for me. On multiple platforms I continually get the same errors. It
took me awhile to figure out some initial things, such as Migrations
don''t seem to support Enum column types, and doesn''t really support
Foreign key relationships (the constraints at least). After changing
my DB schema to jive more with the
2006 Jan 21
4
Single quotes in parameters
I have a "search" action for my "projects" controller, which defines a
set of projects as follows
@projects = Project.find(:all, :include => [:user,:clients], :conditions
=> "name like ''%" + params[:query] + "%''",:order => ''number'')
This works fine, until I type an entry into my search box that has a
single
2005 Dec 19
2
Logging of Form information in production environment.
It seems that in the default Production environment, Rails logs posted
form data. Isn't this a security risk? Especially since a user
creation form puts this in the logfile:
Processing Base#index (for 127.0.0.1 at 2005-12-18 21:03:33) [POST]
Parameters: {"user"=>{"password_confirmation"=>"mypassword",
"username"=>"seanwolfe",
2006 Feb 02
3
breakpointer failing
Hey there,
I got a new workstation going on here an Intel iMac, and I''ve compiled
and installed everything with intel binaries. Everything works fine, I
even got that cool clever lighttpd script running
(http://www.bigbold.com/snippets/posts/show/303).
But the one thing that doesn''t work is breakpoints and the breakpointer script.
When I run script/breakpointer, I get the
2006 Feb 20
1
Breakpointer fixed in OSX 10.4.5
The new build of OSX 10.4.5 seems to fix the issues many have been
reporting with the breakpointer script. This fix at least seems to
work on the Intel macs. Haven''t checked it on the PPC macs yet, but I
haven''t had the ''getaddrinfo'' errors on the PPC macs.
--
Sean Wolfe
master nerd of
i heart squares, Co.
3711 N. Ravenswood Ave. #147 Chicago, IL 60613
2006 Feb 11
3
Intial data in Migrations
One thing I found annoying about Migrations, besides that you have a
very limited ways to define your data, is that it will overwrite
EVERYTHING in your schema file. So if you spend hours customizing your
initial schema file, to get it work, exactly like you''ll need it, that
work immediately becomes for nothing once you run a migration. Your
entire schema will get rewritten, not appended
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys,
1. Which is the difference between this two methods? (select_datetime,
datetime_select)
2. How I assign the selected date-time values, to an specific variable
or array using select_datetime
I know do it using datetime_select(''object'',''method'')
I aprecciate your attention.
Thanks
PD: Sorry about my english.
2006 Feb 03
3
Breakpointer not working
When I try to run script/breakpointer, I get the following error:
/usr/local/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'': getnameinfo:
Non-recoverable failure in name resolution (SocketError)
It''s Rails 1.0 on OSX 10.4.4. Any suggestions?
2005 Apr 27
2
noob question: rhtml new/edit views and the date functionality
Hello All,
I''ve been playing with Rails - did the recipe/category sample from
onLamp.com - fairly straight forward - even got it working against
postgres.
Anyway, I''ve been appling rails to a small test project and I can''t
seem to get the syntax down or find a sample of how to use the date
control on a custom new/edit view. The CRUD (is that right?) that
automatically
2005 Dec 12
1
Search screens with dates
Tried googling and searching the lists for this. I''d like to do a
search on some dates and naturally enough use the date helpers. I
have a number of problems:
-- datetime_select wants an active record model
-- select_datetime does not take the options that datetime_select
take - specifically :order
that leaves me with something like
<label>Date/Time
2006 Nov 09
1
POSIXlt converted to POSIXct in as.data.frame()
In trying to use as.Date(), I've come across the conversion of POSIXlt to
POSIXct when a POSIXlt variable is included in a data frame:
my_POSIX <- strptime(c("11-09-2006", "11-10-2006", "11-11-2006",
"11-12-2006", "11-13-2006"), "%m-%d-%Y")
str(my_POSIX)
my_Date <- as.Date(my_POSIX)
str(my_Date)
data <- format(my_Date)
2008 Feb 19
3
will_paginate question
Hi-
Is it possible to use search parameters with will_paginate?
For example, something like this:
@var = Model.paginate :per_page => 20, :page => params[:page],
:order => ''my_date DESC'', :conditions
=>["my_date >= ? AND my_date <=?",@start,@end]
I am getting some errors with this, but will this generally work?
2006 Mar 27
0
Contract Development positions available.
Hi list, sorry to post this here, but I figured I''d throw out a hook
and see if I get any nibbles.
My usual network channels are turning up dry, and I''d rather offer
this directly to the Rails community before I start hitting up
Monster/Dice and headhunters.
Our work base has been growing and I really need to hire someone on a
contract basis to fulfill some
2006 Jun 18
4
uninitialized constant Datetime
I am building an application and I have generated the scaffold for a
product.
In the list method I include something like
my_date = Datetime.now
and the result I get from the webrick is an error
uninitialized constant Datetime
Do I have to add a line with a require?
I am new at ruby on rails
thanks in advance
--
Posted via http://www.ruby-forum.com/.
2006 Aug 14
2
(no subject)
I have the following code that generates a rhtml page,
<%= start_form_tag :action => ''create'' %>
<%= render :partial => ''form'' %>
<%= submit_tag "Create" %>
<%= end_form_tag %>
<%= link_to ''Back'', :action => ''list'' %>
...I am trying to put a "Browse" button to
2006 Jun 15
1
Multiple :conditions?
How do I add multiple conditions to a paginated list? I have:
@post_pages, @posts = paginate(:posts,
:per_page => 10,
:conditions => [ ''(title) OR (body)
LIKE ?'', ''%'' + params[:query] + ''%''],
:order =>
2007 Apr 23
3
How to change Date format
Hi all,
I am using InstantRails with MySQL-Front. Date is stored in format
yyyy-mm-dd
in database. I want to retrieve and show date in dd-mm-yyyy in my
view.rhtml.
How can I change it to dd-mm-yyyy form.
Please help me out.
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2006 Jan 23
3
date.to_s trimming
When I convert a datetime to a string, it prints out something like this
Jan 20 12:00:00 EST 2006
I want to trim off the last twelve characters, i.e.
:00 EST 2006
I tried to do it like so:
@date =
@meeting.date.to_s.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp
but the chomps seem to do nothing. I''d love to use regex, but I don''t
know which