Displaying 20 results from an estimated 2000 matches similar to: "validation in a "subform""
2009 Nov 18
4
rails newbie : routing error
After much ado about the naming of model adn controllers...
model : Expense
controller : Expenses
route : map.resources :expenses
Here I am using mysql database and created a unique index, since
db:migrated created an id object and made it as primary key. Now in
the
def create
@expense = Expense.new(params[:expense])
if @expense.save
flash[:viola] = ''New expense saved.. be
2006 Feb 08
1
Adding children via small subform
I''ve read AWDR and especially the part concerning adding child
line_items to an order. Unfortunately I want to do my process in
reverse and in doing what I thought would work I get a null object error
when trying to append the children to the parent.
This is a _major_ stumbling block in my Rails use as almost every one of
my projects has needed this so its a pretty vital problem I need
2006 Apr 06
1
Look What 911 Will Cost in Canada
Check out the proposed prices when this is approved.
BELL CANADA REPORT
ON THE
ECONOMIC EVALUATION
FOR
THE TARIFF REVISION
OF
Bell Canada's Access Services Tariff Item 315 ? Zero-Dialed
Emergency Call Routing Service (0-ECRS)
*2 March 2006
TABLE OF CONTENTS
Page
1.0 GENERAL 3
1.1 Purpose of the Study 3
2.0 SERVICE DESCRIPTION 3
2.1 Service Characteristics 3
2.2
2008 Mar 08
9
Newbie worries with "Developing Rails Applications on Max OSX Leopard"
Hello There,
As a new comer to RoR, I started to follow the article
http://developer.apple.com/tools/developonrailsleopard.html. In short
you create to entities and one one-to-many relation linking them.
Everything was good until the establishment of the relation. I am
unable to go any further than "Linking Models Together" : I can create
the "vendors" mentionned in the
2006 Mar 31
14
[newbi] Create a Model
Hello All,
Yesterday i put RoR with Locomotive. I am very happy :p.
So I follow this tuto
(http://developer.apple.com/tools/rubyonrails.html). I used Sqlite.
my database.yml
# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
# Get the fast C bindings:
# gem install mysql
# (on OS X: gem install mysql -- --include=/usr/local/lib)
# And be sure to use new-style password
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor
In Expense#new there''s a form with a Vendors-drop-down and a NewVendor-
button.
The latter button brings up Vendor#new.
The Create button in Vendor#new brings up Vendor#show with Edit & Back
links.
I want to append a third link conditionally to Vendor#show: if the
Expense#new form led to the Vendor#show
2010 Jul 16
31
Added associations but don't see generated methods
Hi,
I''ve got a Rails app working that includes two two classes, etc.:
Expense & Vendor. I eventually learned that the mental concept I had
of their relationship should be express in Rails as:
class Expense < ActiveRecord::Base; belongs_to :vendor; end
class Vendor < ActiveRecord::Base; has_many :expenses; end
2006 Apr 07
6
Foreign Key naming convention override
I am working with an existing database and have to keep all table and
field names as they are. ''tblcustomers'' and ''tblitems'' are linked by the
''tblcustomers'' id field ''tblcustomersid''. In ''tblitems'', the foreign key
is called ''txtcustomerid''.
I have already set the customers model to
2012 Feb 26
0
how to get the index of the element passed to the render view ?
I am displaying a collection of expenses in a form
the view in which the fom is displayed :
...
= simple_form_for(@project, :html => {:class => ''form-stacked'' })
do |f|
- unless @project.expenses.count > 0
No expenses
- else
#expenses
= f.fields_for :expenses do |f|
= render "backoffice/projects/expense_fields", :f
2010 Mar 22
7
How to reference a select_tag within a form
Hi All,
Inside my app\views\expenses\new.html.erb file, I had the code:
<% form_for(@expense) do |f| %>
[snip]
<p>
<%= f.label :vendor %><br />
<%= f.text_field :vendor %>
<br />
<div id="vendor_droplist>
<%= select_tag "test",
options_for_select(@current_vendors.collect { |v|
v.nickname }),
{:multiple
2007 Aug 31
2
Microsoft RTAudio
Hello Ivo:
One more from me and I suppose a retort by you
and that's it ... no flame war please. Let's see
if we can keep this discussion objective.
I've had enough life experience to have seen and
heard the mistakes you've made many times. Point by point:
* This is a tech list that I joined a number
of years ago because of a serious intent to use
the Speex product in my
2009 Jun 09
1
Read only configuration.
Hi,
I currently I have a Samba share configured as follows:
[pub_fileshare]
comment = Public fileshare
path = /u02/pub
guest ok = Yes
writeable = Yes
There is a subfolder under /u02/pub called /u02/pub/expenses/hardware
that I need to make read only. How do I do this? I am new to using
Samba.
I configured the share /u02/pub/expenses/hardware using the
configuration below. This works as it is
2008 Sep 15
2
Can't get script/server (or any script to work) in beginning ROR installation
I have been following the instructions found in Apple''s Developer
Guide to developing ROR with Leopard found here:
http://developer.apple.com/tools/developonrailsleopard.html
I''ve gotten to the point where I''m supposed to execute "script/
server" (specifically, from the XCode run menu, but I get the same
error doing it from the console)...the result should be
2012 Mar 26
3
render :json not sending any data back ...
[rails 3.2.2]
I perform an ajax call :
...
$.ajax
url: " /backoffice/expenses/rate"
type: "GET"
dataType: "json"
data:
project_id: $(''#project_id'').val()
code: $(this).val()
success: (result) ->
alert result
$(''#expense_price'').val(result)
in
2006 Nov 14
4
Catching a list of variables with a Controller
Hi All,
I have been learning some ruby and some Camping at the same time by
implementing a little webapp to track expenses (one man''s blog...) that
includes the ability to tag entries with 1 or more tags.
I wanted to offer the possibility to narrow the view of expenses by adding
tags to a filter (this works) and I also wanted this filter to be reflected
in the URL. Like so:
normal URL:
2006 Apr 20
1
Capistrano not working for me
Hello fellow railers,
I''m new to the whole RoR thing and I have finished installing and setting
everything up on my OSX G4 Powerbook. I followed the step by step
instructions at Hivelogic, running lighttpd and everything else. I''m having
an issue with Capistrano.
I''m following the tutorial at Apple:
http://developer.apple.com/tools/rubyonrails.html
Everything in
2006 Jul 27
2
more on file upload
well, so File upload seems to be only working under mongrel.
I have not tried it, but Camping crash extracting the request parameters on
both CGI and FastCGI.
I''m looking at rails code for inspiration, but it''s a bit outside of my
knowledge.....
not sure what to do with a FCGI::Stream object .....
this is what rails do for CGI, I''m not sure if it works the same for
2006 Jul 12
1
Question re: Computing a field in a DB record
I''m just learning Rails and have encountered a problem trying to set
a field in a DB record based on the value of another form input
field. Using the scaffold code, the create works as expected and the
update (edit) also works. However, one of the DB fields (amount) is
supposed to be computer from another (units): if the category field
is "Mileage", amount= units *
2008 May 07
2
design question
Hi,
I''m developing a budget planner for myself and do have a table for recurring
expenses, as well as a transaction table for my bank account CSV file
uploads.
Questions: For the projections forward in time I''m wonder whether to:
(a) keep it simple and just calculate future balance projections on the fly,
then feed to gruff graphs
(b) each time a recurring item changes, or
2006 May 18
4
Cascaded Forms
Hi guys, it''s me again ;)
is it possible to put forms into forms? My problem is, i have a form
which gathers informations about an SSL Certificate order. There is a
field which holds the SSL CSR file. Now i wanted to put in a subform
which has an form_remote_tag and decodes that CSR file and returns if
everything was okay or not.
Now if i put in a submit_tag it submits my form which