Displaying 14 results from an estimated 14 matches for "pardee".
2008 Apr 29
10
Better way to remove value from list??
I''ve got a field in a database that contains a string of ids.
I want to be able to remove an item from that list and save the list
again. The only way I saw how to do this was to convert it to an array
and back to a string again.
The variable names are for an example.
This code works, but I don''t think that it''s efficient. It''s all in my
controller.
2008 Jul 21
6
form_for and select ( => f.select)
Hi All
I''m trying to combine the from_for and select helpers
Right now I have
form_for :service, :url => ...... do |f|
select("abc", "xyz_id", @my_arr.collect {|item| [ item, "bla" ] },
{:prompt => "opt1"} )
....
end
What I want to do is something like
....
f.select("abc", "xyz_id", @my_arr.collect {|item|
2008 Oct 16
4
Removing values from a select (drop-down) box
Hello,
I am working on a project, and on one form we have a select (drop-
down) box where the user needs to be able to select from a list of
clients. The box is currently being populated with:
<%= collection_select(:client, :id, @account.clients, :id, :name) %>
The problem is that some of these clients may have already been
selected, and we need to remove them from the list. Is this
2008 May 02
1
names of select elements inside a fields_for block not generated as expected
...yourself "he''s got to call those select
helpers on the pp_form object that the fields_for block yields." If I
do that, I get (e.g.): undefined method `merge'' for :nom:Symbol. So are
there different select helpers for using inside fields_for?
Many thanks!
-Roy
Roy Pardee
Research Analyst/Programmer
Group Health Center For Health Studies (Cancer Research Network)
(206) 287-2078
Google Talk: rpardee
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To...
2006 Aug 22
0
rpart output: rule extraction beyond path.rpart()
...hink of ways to write code to do this automatically, but would
prefer not to if it's already implemented. I have done extensive
searching and turned up nothing, but I fear I might just be lacking the
right terminology. Any thoughts?
Much appreciated,
-Ben
Ben Bryant
Doctoral Fellow
Pardee RAND Graduate School
bryant@prgs.edu
--------------------
This email message is for the sole use of the intended recip...{{dropped}}
2008 May 21
2
Scaffolding and ActiveRecord in Rails 2
Hi,
Is is possible to add this constraint: "null => false" and "limit => 45"
like below:
create_table :movie do |t|
t.string :name, :null => false, :limit => 45
end
...just by using this kind of scaffold command (on Rails 2)?
$ ruby script/generate scaffold Movie name:string
Thanks,
D.
--
Posted via http://www.ruby-forum.com/.
2008 Jul 17
2
Passing array to the email body using ActionMailer
Hi, all
I am new to actionmailer. I am writing a script that sends emails
contains lots of file names.
So the email will look like:
hi,
filename1
filename2
filename3
.
.
.
filenameN
So I want to pass an array containing all the filenames into the email
body.
My code is below:
class Notifier < ActionMailer::Base
def log_report(recipient, files)
from
2010 Jan 15
3
Samba, and NFS. lag?
...Windows networking.
Any suggestions? Anything i can check? Am i perhaps looking an an NFS
performance issue? I'm able to modify files over the nfs mount from the
smb server without an issue.
Thanks!
- --
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nathan Lager
System Administrator
11 Pardee Hall
Lafayette College, Easton, PA 18042
610-330-5907
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAktQzhQACgkQsZqG4IN3sumiIACgq9ms6T+hVVBVgdCyPztB6SMV
bhYAnRM+bEJ3Mz5Gu96/iVqVYS4Hz/cH
=v0Q/
-----END PGP...
2008 Oct 09
2
has_many validation the Rails way
Okay, this is something I run into a lot and don''t really have a great
solution. Here is a simple example:
class Blog < ActiveRecord::Base
has_many :posts
validates_presence_of :name
end
class Post < ActiveRecord::Base
belongs_to :blog
validates_presence_of :name
validates_presence_of :blog_id
end
Now, if I want to create a blog and post at the same time I
2009 Sep 14
2
Set a select box with default value selected
I am relating to the book & subject example mentioned in the tutorial
mentioned here:
http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-examples.htm
There is a file that goes like show_subjects.html.erb and it will list
all the books for that particular subject we''ve selected.
Suppose if there were no books to show for the subject we can ideally
show a corresponding message
2008 May 29
6
Production install (RoR + Oracle + IIS)
Hi.
Although an expert developer for IBM systems (iSeries) I am VERY new
to RoR and somehow to the PC development world as well and not
familiar AT ALL with PC configurations, etc. (in my regular job good
ol'' IBM takes care of all that and I just need to code). So forgive me
if any of the following sounds stupid, it probably is. Just get a
laugh at my expense and try to answer between
2007 Mar 04
0
Did BackgrounDRb change my apps behavior?
I just installed BackgrounDRb the other day. It''s working great but after I deployed to production, I noticed a couple of strange things happening:
1) I have the following code in a lib module and after deploying, IS_PRODUCTION was set to false. I''m not sure why this started occurring and the only major change was the installation of BackgrounDRb and its dependencies. Could
2008 Aug 20
0
Re: Help with RoR partial views
Your partial uses a simple form_for(@product) call. By default that will do a POST to the products/create action, which if it''s successful, does a redirect to products/show/<<id for the new product>> (see the create method in your products_controller.rb file).
My advice is to just play around w/rails for a bit & get used to its conventions before you try to bend it to
2009 Sep 14
0
markdown call prompts "uninitialized constant ActionView::Helpers::TextHelper::Markdown" in upgraded application
Hey All,
I''m attempting to upgrade my app from rails 2.0.2 to 2.3.3. One bit that''s failing is this call here (in /views/projects/show.html.erb)
<%= markdown(@project.description) %>
That earns me a:
uninitialized constant ActionView::Helpers::TextHelper::Markdown
On that line.
I''m on a rebuilt machine (windows xp, ruby 1.8.6) so I thought it was a