Displaying 20 results from an estimated 6000 matches similar to: "OT: Best practice for multi-user select boxes"
2006 Nov 04
0
[Markaby] select with acts_as_dropdown problem.
I''m using Markby to convert a standard form witth selects. Can someone tell
me why this works:
<tr>
<td><label class="formLabel" for="task_owner_id">Owner</label></td>
<td><%= select ''task'', ''owner_id'', Owner.to_dropdown %></td>
</tr>
But, the Markaby conversion
2006 May 22
4
naming convention for bridge tables.
I read somewhere that the correct naming of bridge tables is in alpha order.
For example. I have two tables:
houses, and colors.
If I want to create a bridge table to associate colors with houses, I would
name the table:
colors_houses
The associations work fine.
But, if I have a table named: track_houses.
Building a bridge table called: colors_track_houses, gives me model
associaton errors.
2005 Dec 29
6
How do I open and read/write to a file?
I need to process some text files quickly. I''ve not been able to find the
answer in the archive. The Ruby Standard Library site times out. Can
someone tell me where to find info on how to:
1. Get a list of filenames in a directory.
2. How to open a file.
3. How to read it a line at a time.
--
Thanks in advance for the help,
-Larry
"Work, work, work...there is no satisfactory
2006 Mar 19
1
Ruby startup slow on Windows Server 2003
Ruby script/console takes 30-secs to start on the Windows 2003 servers in
our shop. Has anyone found a way to speed that up? ( I know Linux is much
faster, but that''s not an option, in this case).
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory alternative."
--- E.Taft Benson
-------------- next part --------------
An HTML attachment was
2006 Jul 17
6
Has markaby been abandoned?
Recently discovered Markaby. Before I use it on a production system, I''d
like to know if it is still being maintained? According to the change log,
the last change was in February of 2006. Does this mean that the project has
been abandoned? Or, at version 0.3 it was considered production stable and
complete?
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory
2006 Mar 23
6
[mongrel] [fedora5] install error " can''t find ruby libs"
Installed Fedora5.
Installed Ruby 1.8.4.
Installed rubygems.
Installed rails.
Created test app to verify that ruby and rails were working.
When I attempted to install mongrel via:
sudo gem install mongrel
I get this error:
Install required dependency daemons? [Yn] y
Install required dependency gem_plugin? [Yn] y
Building native extensions. This could take a while...
can''t find
2006 Apr 03
1
How to handle failed finds.
What''s the best way to handle a find that doesn''t find anything?
For example.
Model Foo
@result = Foo.find(:first, :condition => "some condtion string").name
if the condition is not met Foo.find stops the application with ''unexpected
nil''.
What is the best way to gracefully trap this error and return something
meaningfull to the calling
2006 Aug 14
0
acts_as_dropdown: NoMethodError on load
Rails 1.1.6 on gems
I had the acts_as_dropdown plugin working fine, but now starting webrick
gives me a:
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/base.rb:1129:in
`method_missing'':
undefined method `acts_as_dropdown'' for User:Class (NoMethodError)
My other plugins are working fine.
I have the latest version of acts_as_dropdown.
Gems are
2006 Jun 15
6
[OT] Tables VS divs for form layout.
I''ve been using tables to get my forms to line up. ( I have usually one
column for labels, and a column for values ). Should I be using divs
instead? I''ve been reading some CSS design books lately. They tend to
recommend divs over tables for general page layout stuff. But, what about
the forms elements? What''s the ''best practice'' in this regard?
2006 Mar 10
7
ODBC adapter connection help please.
Does anyone have any experience getting ODBC to work? I could really use
some help here.
I''m having trouble accessing a db2 database via odbc using rails. It''s an
external database, that I import data from. I have placed the connection
code in my model :
unless connected?
establish_connection(
:adapter => "odbc",
:dsn => "<dsn
2007 Mar 07
4
Strange Problem With Unwanted, Transient Caching
Hello,
I hope somebody can explain to me what''s going on here because I''m
baffled!
In a controller''s action I want to create a new order for a
customer. Because I post back to the same action (not RESTful I
know, but that''s for another day) I use code like this:
def edit
@order = Order.find_by_id(params[:id]) || Order.new
...
end
I
2006 Jul 26
4
Dropdown with concatenated columns.
What is the best way to create a drop down where the viewable text in a
concatenation of 2 or more columns?
For instance, I hane a lookup table with these columns.
Model FOO
columns: id , name, phone
In my drop select tag, I''d like the user to see:
"name1 phone1"
"name2 phone2"
etc..
I know I can do this using find_by_sql . ..
But, isn''t there a more
2005 Oct 12
6
[OT] Gentoo install help please
I''ve decided to take the plunge and go with Gentoo for my rails development
and test box. I figure the easy of maintenance is worth the setup hassles.
Anyway, I''m followin the instructions on the Gentoo web site. I''ve selected
the ..''i686'' 2.6 kernel for my 700mhz amd processor, and choosen stage3
install option from CD. I''m now at the the
2006 Mar 18
9
How do I write this SQL the Rails way?
I''m trying to find all the unique bill_number, status records in Bills
table. I can do it with a find_by_sql statement like this:
@records = Bill.find_by_sql( "select distinct bill_number, status
from bills
group by bill_number, status;")
How would I rewrite it using ''find :all
2006 Apr 28
6
[OT] Ruby ftp client for windows
I know this is off topic, But, my boss has tasked me with finding a better
ftp client than the one in Windows XP. Is there a Ruby client that can
recover dropped connections, ( a resume feature)? Would be nice if it could
handle secure/ encrypted transmissions as well?
Failing that, can anyone recommend a good scriptable ftp client for the
Windows plaftorm?
--
Best Regards,
-Larry
"Work,
2006 Jul 20
3
[OT Ruby] Displaying a binary ?
How to I display the binary equivalent of a number? I tried this:
b = 0b1101
puts b # returns decimal value ( 13 )
b.to_bn # generates "unable to convert FIXNUM to STRING.." error.
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory alternative."
--- E.Taft Benson
-------------- next part --------------
An HTML attachment was scrubbed...
2006 Jul 21
3
Extending scaffold with plugin
I want to create a new scaffold. Would it be best to implement as a plugin?
Any tips on how to get started?
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory alternative."
--- E.Taft Benson
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 19
2
is there a ''Markaby_scaffold'' available?
I discovered Markaby recently, and am loving it! I''m generating scaffolds,
then converting them to Markaby ''.mab'' files. It got me wondering... Has
anyone written a plugin to generate scaffolds in Markaby, yet?? That would
be truly awesome if there was on out there already.
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory
2006 Feb 16
2
How do I use ODBC with rails.
I have an app that needs to retreive data through an ODBC connection on a
windows platform. Has anyone done this? Would someone be able to walk me
through it? or point me to the relavant docs. My searches haven''t turned up
any usefull information so far.
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory alternative."
--- E.Taft Benson
2006 Feb 22
1
Running mysql scripts from rails.
How do I run SQL scripts from rails?
I have a testing menu item called "import data".
How can I get it to call a SQL script file that will import the data into a
MySQL table for me?
--
Best Regards,
-Larry
"Work, work, work...there is no satisfactory alternative."
--- E.Taft Benson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: