Displaying 20 results from an estimated 100 matches similar to: "gain value from form"
2006 Apr 28
7
acts as drop down
Hi
Im using the acts as drop down plugin
and have this code below
acts_as_dropdown :text => "forename", :order => "forename"
It currently makes use of the forename in the option tag, how can I get
it to use the surname as well
ie somthing like ''forename'' . ''surname'' in php
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 Jun 01
4
can''t convert Fixnum into String ??
I have been getting this error message on various pages, just wondering
if anyone could explain whats going wrong, and the best way to correct
it
code that is cuasing the problem is below
@project = Project.find(:first, :conditions => "id = " +
@purchaseorder.project_id)
--
Posted via http://www.ruby-forum.com/.
2018 Apr 09
3
convert numeric variables to factor
Or use cut():
> Num <- c(2.2, 2.4, 3.5, 5, 7)
> cut(Num, breaks=c(0,2,4,6), labels=c("Low","Medium","High"))
[1] Medium Medium Medium High <NA>
Levels: Low Medium High
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Apr 9, 2018 at 10:00 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> Just cast it!
>
> ?factor
> Bert
2006 May 08
4
set forign key
hi,
got a small problem below and not to sure how to overcome this using
rails
two tables involved with this projects and quotes
each project has a field quote_id as a forign field.
When a user is ready to upload a quote they are linked to quotes/new
from the show project page. Once the quote is uploaded how can I then
set the quote_id field with the correct key?
--
Posted via
2006 Sep 05
0
rake craziness with Migrate as a dependency
Hi everyone,
For one of our projects we have a need to deploy and maintain a demo.
As a result I''ve attempted to setup a set of rake tasks for the job.
My goal is have one rake task called "deploy_demo" which purges the
database, migrates to the current schema, and loads the db from a set
of fixture files in a specified location.
I''ve written two new tasks the perform
2012 May 01
2
kvm & virtio performance
hi, anyone test freebsd as guest on kvm with virtio drivers? any expirience?
2010 Nov 05
0
Need a optimized version of this
The rails version is 2.3
I have a relation offers hm prices
In the prices table a have a column named well base_price, + promotion
and last_minute
The prices for one offer can have promotion checked or last_minute
checked indicating that the current price is a promotion or last
minute,
to find out if a offer is a promotion or last_minute, and view that in
the search results I need to get the
2007 Dec 04
7
REST bug with form_for
Hi all, I am running on Windows XP sp2 with ruby 1.8.6, and rails
1.2.3
I am using REST, and have this in my view
<% form_for(:project,
:url => project_path(:user_id => @project.my_user, :id =>
@project),
:html => {:method => :put}) do |f| %>
The browser correctly gives
<form method="post" action="/users/2/projects/1">
2006 Jul 06
6
Functional tsts
Hi all,
I have created projects module in my application using scaffold,
and it created me everything, and all the modules are working except the
functional test. This is the error
1) Failure:
test_create(ProjectsControllerTest)
[test/functional/projects_controller_test.rb
:55]:
Expected response to be a <:redirect>, but was <200>
8 tests, 25 assertions, 1 failures, 0
2006 Jun 05
2
Pagination, how to in rails?
Hi,
Im creating a few reports for a system using ind_by_sql
Are there any built in features that I can use to paginate the results
and how can this be achived?
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 Jun 05
5
apply more than one condition to a find(:all
Hi
I have the find statement below, how can I apply another condition to
this to say AND status > 3
@projectReport = Project.find(:all, :conditions => ''status != 7'')
Thanks
scott
--
Posted via http://www.ruby-forum.com/.
2006 May 09
2
retrieve previous id
Hi,
I have this piece of code,
if @quote.save
flash[:notice] = ''Quote was successfully created.''
#return id of preiously inserted quote
#enter this id in the correct related project field
redirect_to :action => ''list''
end
How can I return the id of the saved data?
--
Posted via http://www.ruby-forum.com/.
2006 May 12
4
default value in text field
hi,
This should be really simple, but i cant seem to find the answer
anywhere!!
In my _form.rhtml I have the following text field, how can I define a
default value?
<%= text_field ''purchaseorder'', ''number'' %>
--
Posted via http://www.ruby-forum.com/.
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
any suggestions on why I am gaining this error.
ActiveRecord::StatementInvalid in ProjectsController#create
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near '' , , , , )'' at line 1: INSERT INTO projects (`name`,
`date_created`, `quote_id`, `client_id`, `description`, `user_id`)
2008 Apr 21
1
Urgent ActiveRecord has_many Problem - Please Help
Hi Guys,
I''ve been looking everywhere for an answer to this but so far without
success.
I have three models:
1) employees
has_many :memberships
has_many :projects, :through => :membership
2) projects
has_many :memberships
has_many :employees, :through => :membership
3) membership
belongs_to :employees
belongs_to :projects
Membership is used to join employees
2010 Jan 07
2
Find by looping thru array
Hello all,
I''m in my third month of Ruby on Rails. I think it''s coming along
fairly well.
My current issue is this.
I''m do a search based on string data some of which is very long. So I''m
doing a similar match using "amatch" gem.
When I have a 50% or greater match I store the id to an array.
How can I do a find looping thru the array then send the
2008 May 13
0
Problem geting web interface to work
Hi,
i have installed CruiseControlRB 1.3.0. With no project added the web interface at localhost:3333 looks find.
I have successfully added one of my projects (batch file which builds some c++ code) which is also building fine.
But the web interface is no more working - i get the following message "Errno::EINVAL in Projects#index".
I have attached a log (run with --trace) which
2006 Apr 28
2
outputing table data
Hi,
Just come across thi sproblem, and jsut cant find out what is wrong with
it, if any one has any suggestions it would be good.
in my projects_controller.rb I have
def list
@project_pages, @projects = paginate :projects, :per_page => 10
end
and ths list.rhtml file I have
<table>
<tr>
<th>Name</th>
<th>Actions</th>
2007 Aug 10
1
ActionMailer and Dreamhost
Hello,
I am running my RoR app on localhost and am trying to implement
ActionMailer. In my environment.rb config file, I am pointing to my
smtp server on Dreamhost:
ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.server_settings = {
:address => ''mail.domain.info'',
:port => 25,
:domain =>
2006 Dec 27
0
HABTM Checkboxes - Adding/Updating Users to a Project
Hello all,
I''m trying to create a HABTM checkbox action that adds/updates ''users''
to a ''project''.
I have the following laid out.
---------------------
TABLES
---------------------
create_table "assignments", :id => false, :force => true do |t|
t.column "project_id", :integer, :default => 0, :null => false