similar to: RE: Rails Digest, Vol 21, Issue 160

Displaying 20 results from an estimated 1000 matches similar to: "RE: Rails Digest, Vol 21, Issue 160"

2006 Jun 04
3
passing a value in a hidden field inside a form
should be trivial but I can''t figure this out from api <%= hidden_field ''certifications'', ''personnel_id'', {value = #{@personnel.id}} %> I want to pass the value of ''id'' field in my form to the certifications controller as personnel_id Craig
2006 Jun 05
5
adding habtm through migrations
Hello, I''m stuck, I''ve got a model Product and would like to add a new model called Category. Furthermore, I want to set up a many2many relationship between the mentioned models. the problem is that I do not know how to set the primary key in the categories_products table. this is what I''ve got in my migration file: create_table :categories do |t| t.column :name,
2007 Feb 24
2
RESTful PUT and button_to
I''m working on a RESTful app, and I''ve hit a snag. Here''s a simplified example of the problem. (Excuse me if this example code isn''t strictly correct; I''m typing from memory.) Suppose I have a table which models a simple counter. It has a single column, "count": class CreateCounters < ActiveRecord::Migration def self.up
2008 Feb 12
0
button_to problem http://localhost:3000/art/151470;edi
hi all, now i am facing problem with button_to , it shows the path like http://localhost:3000/art/151470;edit instead of http://localhost:3000/art/edit/151470 the path is not displaying problem, so i got the error , no route found. in application_helper : def button_to(name, options = {}, html_options = nil) html_options = html_options.stringify_keys
2006 Jan 20
1
form_tag and multiple buttons inside problem
Hi, I have a bit of a problem with a form in rails. Well, the problem really is me not fully understanding the mechanism of the form_tag, so here''s what i try to do: The idea is to present a some edit fields for some @product attributes and then present a table showing the @product.pieces (pieces for every @product) and to include a "Edit Piece" and "Delete Piece"
2007 Sep 04
2
How can i add a confirmation dialog to a submit_tag?
When i use button_to or link_to, i can easily request a confirmation dialog with (for example) <%= button_to "Delete this story", { :controller => "story", :action => "delete", :id => @story.id }, :confirm => "Delete story: are you sure?" %> I also want to do this for the submit buttons on my forms, which are
2006 Jul 24
2
:disable_with for button_to ???
With form_tag submit buttons I use the " :disable_with => ''button label while processing'' " option so that visitors with slow connections aren''t able to submit forms twice. How do I do the same thing with button_to? I''ve got several pages where there are multiple forms on the page being updated with Ajax so I can''t wrap the whole
2006 May 23
3
Pagination problem
hi everybody, i am new to rails.. plz clear my doubt... this is my question In my table(public_topics), i have 11 rows of data.. whenever i run the following view, it shows the entire rows in the current page.. and i have set the '':per_page'' option to ''2''.so it must show two data per page..but it shows all the rows in a single page..and this case continue
2008 Jun 14
0
does BackgrounDRB not "know" the rails environment it is running within/in parallel with?]
Hi, it probably is a noob question but I''m confused by this error message: active_support/dependencies.rb:478:in `const_missing'': uninitialized constant Invoice::ApplicationController Situation: I have an InvoicesController with a create method that in turn calls upon a MiddleMan.worker(:billing_worker), which in turn finds an Invoice and calls upon @invoice.print_invoice
2006 Mar 25
5
button_to with image?
I''m trying to use button_to and have it use an image in place of the submit button. I had figured it would work the same as link_to like so: button_to(image_tag("editicon", :size => "16x16", :border => 0), :action => ''edit'', :id => person.id) but this instead displays the image code as the button name. Surely there is a simple way to
2012 Aug 10
1
button_to with image
I''m calling button_to in my page, and it renders a form with a submit button just fine. But what I''d really like is <input type="img" src="myimage.png" .....> instead of <input type="submit...> button_to doesn''t seem able to do this, :type and :src parameters get ignored. Is there a way to do it? -- Tim Slattery
2006 Feb 10
1
Eager loading issue
I have three tables, Invoices, Projects, and Managers. Each manager has many projects. Each project has many invoices. When displaying a list of the invoices, I am using: Invoice.find(:all, :include => [:project]) Since the list shows information from the project table. (For example, a table showing Invoice Date, Project Name). However, I''d also like to show the manager name.
2006 May 31
1
find by sql
Hi I have the following code, which makes use of an sql statment to get the results required. However this just doesnt seem right for rails, as ive managed to develop the whole project without using any other pure sql. Is there a cleaner way of doing this, but gaining the same results. thanks scott #sql to find all invoices pSql = "SELECT DISTINCT invoices.id,
2011 Dec 07
1
scatterplotting stock returns using quantmod and pairs()
I want to get data for a set of ticker symbols and compute the daily return of the adjusted close using quantmod, and then scatterplot returns using pairs(). The following gets data for the list of tickers: tickers <- c("SHY","TLT","SPY","IWM","GLD","IEV","ILF","EWJ","EPP","SAF","ASA")
2012 Oct 06
1
Download limit
Hi all, I am trying to use in RStudio the latest code given in https://github.com/systematicinvestor/SIT/blob/master/R/bt.test.r, which seems to work fine but with the following warning for download limits (one for each of the tickers). I searched in options() something which could be related to this setting, w/o success. Any hint for me in order to raise or remove these limits? Where is this
2006 Jul 20
0
Getting joined collections on a form
Greetings, I''m looking for suggestions on how to simplify getting customer addresses on a form: I''m jumping between controller and view several times; alternating between rhtml and rjs, in order to display customers and their addresses on an invoicing form. It''s very messy. I have a one to many relationship between Customer and Addresses, each customer has one or more
2006 Jul 21
0
Selecting customers and addresses in a form (was Getting joined collections on a form)
(Sorry if you have received this twice, I''m having trouble sending mail to the rails list) Greetings, I''m looking for suggestions on how to simplify getting customer addresses on a form: I''m jumping between controller and view several times; alternating between rhtml and rjs, in order to display customers and their addresses on an invoicing form. It''s very
2006 Jan 03
4
Would someone like to tell me why this code will not solve my problem? (it''s short)
I am building an invoicing system but cannot use the auto_increment field to determine the invoice number (because they are running 3 different companies off the one system. I need to find the last invoice number from any given company and then add 1 to it to get the next invoice number. BUT, there is a unique case on the very first invoice produced because there is no earlier invoice
2014 Apr 16
0
[XPOST] Invoicing - 1.0.0 released
Hello people, We have released invoicing gem which helps you in creating, managing and generating pdf for invoices. Bit of background: Invoicing gem was initially developed by Martin Kleppmann (https://github.com/ept/) for generating and displaying invoices. This release polishes the gem, makes it compatible with rails 3 and rails 4, adds pdf generation source:
2009 Jun 10
2
Vista + R = *!!?@
Hello People of R, Is there any way that I can get R to function properly using Vista. I get very strange output using lmer, as in no p-values. Is there ANY way I can fix this. Thank you for your time, John Townsend-Mehler PhD Candidate Department of Zoology Michigan State University