similar to: show table

Displaying 20 results from an estimated 10000 matches similar to: "show table"

2006 May 15
8
set_table_name and self.table_name
I have some legacy tables that I used set_table_name on, I''m attempting to write a method that will get key value from a sequence table and then update it and return a value. I''m hoping to put this in the base ActiveRecord method so I would like to reference the table name with self.table_name or something... class Contacts < ActiveRecord::Base set_table_name
2013 Mar 07
0
custom table_name for table users with devise
Hi for my app, I have several tables for users (franceusers, belgiumusers, ...) and I would like to use one or another depending on domain I tried with table_name_prefix and table_name but it seems to not work class User < ActiveRecord::Base rolify # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and
2005 Mar 08
4
change the model''s table name
I need to change the name of the table a model is connected to... like the example in the API... the table is called mice and I want a class called Mouse. class Mouse < ActiveRecord::Base table_name "mice" end I''m doing this cause I want tables in my language (italian) and avoid the nameS thing. just adding it in that way doesn''t work ArgumentError in
2006 Aug 05
2
Multi-step forms
I need to create a number of multi-step forms for creating models. Currently i''m looking at http://www.bigbold.com/snippets/posts/show/277 As a solution. Are there any other methods you guys would recommend? Are there any reusable (dry) methods of creating multiple multi-step forms? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2013 Feb 18
6
How to clear ActiveRecord query cache on associations with dynamic table
In part of my application I''m using dynamic tables. I''m aware of the single thread conditions. I''ve tackled some caveats yet - will post a blog about it soon - but there''s one I need help with. Consider 2 models that are associated: Order and OrderLine where Order has many order_lines. Now we set the table names for them:
2006 Sep 30
6
generating unique tracking numbers
Hello, I''m interested in learning what folks in the Rails community do when they need to generate permanent unique numbers for tracking objects such as packing slips, inventory items, customers, employees, etc. It''s tempting to use the autogenerated id, but they''re not pretty enough for human consumption and it can be problematic having assigned ids if tables ever need
2006 Feb 21
8
pdf generators
Hi Folks, Could you please comment on various PDF generators that one may use. Thanks. Lalit Send instant messages to your online friends http://au.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060221/8b319788/attachment.html
2006 Jun 30
0
find_by_sql not quoting properly (in acts_as_taggable plugin)
I have run into a very strange problem discovered through the use of the acts_as_taggable plugin, but related to quoting/sanitizing the interpolated list in a find_by_sql. Apologies for the length, but I wanted to be complete. ;-) The method from acts_as_taggable.rb is: def find_tagged_with(list) find_by_sql(["SELECT #{table_name}.* FROM #{table_name}, tags,
2006 Aug 14
0
Sharing a link with snippets
Just wanted to share a link with anyone that might be interested in seeing or sharing snippets. I came across this and it looked like there are some useful things: http://www.bigbold.com/snippets/ Stuart
2005 Dec 19
0
Snippets software
I''m looking for some sort of snippets software i can use internally in m company, to store all sort of little hints and tricks you discover. I know of : http://www.bigbold.com/snippets/ And have seen a very cool version in a ajax demo movie on rubyonrails. Anybody a good hint for some sort of software ? Daniel -- Posted via http://www.ruby-forum.com/.
2006 Feb 11
2
two questions:
Hi Braves there, 1) Could someone please provide the code for creating menus? 2) How could I get the list of all tables (MySQL)? Thanks much. Jeff Send instant messages to your online friends http://au.messenger.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Mar 13
0
Getting AR to downcase table and column names
I''m looking for the cleanest way to force the Rails framework to use a lower-case version of the table and column names in a database when creating records. I need this for a Rails application that displays the status of an existing backup system. The backup system (Bacula; Nice backup system, BTW) can use either Postgres or Mysql as its database engine. Unfortunately, the table and
2005 Aug 10
0
JavaScript versions of the functions described in Martin Fowler''s article "CollectionClosureMethod"
I just saw this posted on Snippets a second ago: http://www.bigbold.com/snippets/posts/show/575 Is this in prototype? If not, it should be IMO! -- rick http://techno-weenie.net
2006 Mar 15
0
Rails Plugin to Validate (X)HTML and CSS
Hi, I just released an enhanced version of Scott Raymond''s assert_valid_markup plugin that I have been using. Basically it allows you to validate (X)HTML or CSS files generated by application during testing. I have described the basics of it at; http://www.realityforge.org/articles/2006/03/15/rails-plugin-to-validate-x-html-and-css or you can grab it from subversion at
2006 Jun 07
5
File is nil
I don''t understand why my program does not get the file that I try to upload. It returns the following error when I try to upload a small file: NoMethodError in LogfileController#create You have a nil object when you didn''t expect it! The error occured while evaluating nil.original_filename #{RAILS_ROOT}/app/models/logfile.rb:9:in `file=''
2006 Jan 04
3
Legacy Table works-except edit?
Greetings, I''m trying to put a Rails face on a Legacy Oracle 10 table. I am currently setting the table_name and primary_key, and I get the list and show to work fine. However, when I hit edit I just get the Editing <table name>, Edit button, Show, and Back. None of the fields are rendered. Why would I be able to show these fields in the show and list, but not edit them in the
2006 May 10
0
how to implement chained select box without ajax?
Former post focused on the chained select box with ajax select,but how to do that without ajax using rails? This following url can performance well: www.bigbold.com/snippets/posts/show/1916 but it can only work under firefox,while not worked in ie because it use the HTMLSelectElement.prototype,while ie does not support i am still working to modify the source of the above url,but not successful
2006 Nov 08
0
Paginating a fetched resultset problems with next/previous
Im using this paginate function to paginate complex sql queries http://www.bigbold.com/snippets/posts/show/389, all seems to work fine but theres one thing, when i hit the next link it show nothing, i mean it only shows the first page, here is the code im using: #application.rb----------------- def paginate_collection(collection, options = {}) default_options = {:per_page => 10, :page
2007 Feb 08
0
derive.js - Ruby-esque derivation/mixins for Prototype
All, I whipped up a small extension for Prototype to solve some modeling issues I was having on a large JS project. I know there have been serveral alternative "write JS in Ruby" type efforts, including ruby.js, rb2js, and prototype.js itself, but I was hoping to keep it as light as possible while gaining the most powerful aspects of derivation/mixins/callbacks. Much like the prototype
2006 Aug 11
1
unit tests / table names
I recently underwent a (forced) schema change and had to change my "Keyword" class''s table name to "keywords_raw". Changing this in the model was no problem. All my existing unit tests obviously assumed everything was named "keywords" so I''m trying to change things to work, but I can''t figure out the right combo. I''ve tried