similar to: Re: Displaying related tables in forms.. probably an easy qu

Displaying 20 results from an estimated 1000 matches similar to: "Re: Displaying related tables in forms.. probably an easy qu"

2006 Mar 08
2
Displaying related tables in forms.. probably an easy question!
Hey All, I have two tables.. One belongs to another. Why can''t I reference table1.table2.attribute? Specifically, using scaffolding: property.rb - has_one :PropertyType property_type.rb - has_many :Properties property_controller - def list @property_pages, @properties = paginate :properties, :per_page => 10 end list.html: 1. <% for property in @properties %> 2.
2006 Apr 04
0
Parsing a SQL file directly intoactiverecord::executemethod - Not a vamp I swear
It doesn''t like SET commands, or #Comments, etc. Looks like no way = around this without using forgoing active record. I don''t really want = to do that at this point. --------------------------- Brian Corrigan --------------------------- -----Original Message----- From: rails-bounces@lists.rubyonrails.org = [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Brian
2006 Mar 28
1
Efficiently convert this SQL statement to ActiveRecord loop
Hey Folks, My app compares the last known set of files located on a series of servers against a current snapshot for auditing purposes. Its working really well, and I''ll open source it when its complete! Here''s my current issue (and forgive me, I started life as a DBA and I constantly want to revert to connection.execute.) The tables to store my objects are
2006 Apr 04
0
Parsing a SQL file directly into activerecord::executemethod - Not a vamp I swear
In an effort to not be a vamp. (Thanks Amy) Here is the error message = I''m getting. Mysql::Error: #42000You have an error in your SQL syntax; check the = manual that corresponds to your MySQL server version for the right = syntax to use near ''=A1=C9=A8[=A9=B4#Globals = (ActiveRecord::StatementInvalid) SET @rightnow =3D current_timestamp; It appears that Active Record is
2009 Mar 06
0
How to populate form dropdown with 2nd item of model
I''m trying to create a dropdown list that''s populated from a model but which has the 2nd item in the model as the default selection. This is possible. Here''s the model snippet. PROPERTY_TYPES = [[''Choose'', ''''], [''Residential'', ''Residential''],
2006 Aug 04
3
<img onclick> vs link_to_remote()
In one of my view , I have an image the user need to click to close a <div>selections</div> added by an Ajax call. if I use : <img src ="/images/icon_closeitem.gif", size="16*16", border="0",alt="Close Selection", title="Close", onclick="<%= remote_function(:url => { :controller => ''property'',
2006 Mar 17
1
Re: Rails SQL Server adapter
Hey Ryan, I asked this question awhile back, but any support planned for table returning functions, or stored procedures? I''m envisioning basically a mutable model class where you have 1 or more instance variables defined (with default values) that are used in the SQL queries as input parameters. When you instantiate the class you can specifically define these parameters or use the
2006 Apr 04
1
Parsing a SQL file directly into activerecord::execute method
Hello folks, I''m trying to do something like: 1. db = ActiveRecord::Base.establish_connection(:adapter => "mysql", :database => "app_development", :username => "root") 2. Cmd = File.read(''commands.sql'') <--- Command.sql contains multiple valid SQL statement. I''ve tested this directly by piping it into MySQL from the
2005 Nov 02
4
acts_as_metadata?
I''m running into the need (on at least one project now) to implement end-user-customizable "metadata" or properties on model objects. The standard example would be a Person class that had first_name, last_name, etc. but would need to be extended real-time (through the web admin interface) with properties such as phone_number : varchar (30). I''ve done some basic
2006 Apr 17
2
probably easy q: flash before redirect
I''m a little perplexed why this isn''t working: private def check_authorization user = User.find(session[:user]) if user.level == 100 flash[:notice] = "welcome, admin" else flash[:notice] = "ha ha" redirect_to :controller
2008 Sep 09
1
probably easy methods question
Dear R Gurus: I want to look at the code for the t.test function. I did the following: > t.test function (x, ...) UseMethod("t.test") <environment: namespace:stats> > getAnywhere("t.test") A single object matching 't.test' was found It was found in the following places package:stats registered S3 method for t from namespace stats namespace:stats with
2006 Sep 08
1
(Probably Easy) ActiveRecord help needed!
[Using XP, MySQL 5.0, Ruby 1.8.4] Hello, this is my first post. I am new to Ruby, coming from about 6 years of ''import java.util.*''s. I am using ActiveRecord, both on Rails and outside Rails. On Rails I have no trouble. Outside is where it gets confusing. I have created three tables (so far) and their three corresponding classes. Since I''m having the same
2012 Mar 25
3
row, col function but for a list (probably very easy question, cannot seem to find it though)
Hi guys, I'm quite new to R but quite enthousiastic. I'm trying to rewrite a bit of code in order to make it faster, so instead of nesting for loops I'm trying some apply functions. Since it's a combination of lists of matrices and other matrices, I would like to use lapply() on the list and still be able to use the list index to index in the matrices. So, in "code
2019 Aug 04
1
iconv: embedded nulls when converting to UTF-16
R-devel community: I have encountered some unexpected behavior using iconv, which may be the source of errors I am getting when connecting to a UTF-16 -encoded SQL Server database. A simple example is below. When researching this problem, I found r-devel reports of the same problem in threads from June 2010 and February, 2016, and that bug #16738 was posted to Bugzilla as a result. However, I
2006 Mar 16
6
File Auditing with rails - File I/O issue
Hey Folks, I''ve written a script to generate a list of all files on a machine, then zip the results. ?I''m going to stick a web front end on it, and use it to audit some file servers. The problem is that the ZIP compression/decompression isn''t working, but its not what you might think. ?The script completes, but seems to not actually write anything. Here is a short
2006 Apr 04
0
New Rails Group - Albany, NY Area
Hello folks, We have started a new rails community in the Albany, Schenectady, Troy, Saratoga (Tech Valley) are of NY. For now, we have a little listserve up and running. To join, go to www.techvalleyonrails.com Best, Brian --------------------------- Brian Corrigan ---------------------------
2006 Apr 17
0
3rd member
Wow.. We have a 3rd member on the list. Now Mubs and I aren''t just talking to each other! Eric, say hi! Eric, who are you.. what do you do? --------------------------- Brian Corrigan ---------------------------
2006 Mar 16
0
ZLIB::GzipWriter - Strange file encoding?
Hey Folks, I have this code: Zlib::GzipWriter.open("file.gz") do |gz| gz.write(File.read("file.csv")) end Unfortunately this file doesn''t want to open correctly in UltimateZip. It shows a file inside, but doesn''t allow you to extract it. Am I missing something here? Seems pretty cut and dry... --------------------------- Brian Corrigan
2006 Mar 20
1
Migrations with multi-column indexes
Hey Folks, I can''t really glean this from the documentation. Is there a way to do: add_index(table_name, column_name, index_type) within my migration for an index that spans multiple columns? Ie: A covering index on FIRST_NAME, LAST_NAME or something like that? Best, Brian --------------------------- Brian Corrigan ---------------------------
2019 Jun 30
0
Mac OS & Folder Timestamps
On 29/06/2019 19:38, David Corrigan via samba wrote: > So this issue might not strictly a Samba problem, but it happens to be > where I found the issue and maybe there's a solution in the server or > someone who's familiar with the problem. Basically I'm using a Pi as a > small nas. I have a folder /media/ and a script that mounts usb drives > there automatically. So I