similar to: try creating a table for your model

Displaying 20 results from an estimated 4000 matches similar to: "try creating a table for your model"

2006 Aug 15
5
Set up a default route
Phlip wrote: > Can I fix it by adding a view called ''inventories''? That worked, because I have a sufficiently late version of MySQL. Next question. What does "Set up a default route" mean? When I read... http://wiki.rubyonrails.com/rails/pages/Routes ...it reminds me of the Apache documentation for mod_rewrite. I hope someone appreciates the candor of my
2006 Mar 15
1
An Association Problem: AR::Base.find{:include} and n-deep association traversal
Dear List, I''m using Edge Rails. I have a Model with Items for purchase. Each Item is of a certain brand. Class Brand < ActiveRecord::Base end Class Item < ActiveRecord::Base belongs_to :brand end The problem domain is that I''d like to create a separate Inventory list of Items. This includes the date of entry into inventory and date of exit from inventory (ie
2006 Mar 24
6
Microsoft SQL Server has me stumped
I''m tinkering around with an old legacy table in SQL Server 2000. Ruby 1.8.4, most recent ADO.rb file from RubyForge, Rails 1.0 Here''s the model: class InventoryItem < ActiveRecord::Base set_table_name "[_SMDBA_].[_INVENTOR_]" set_primary_key "sequence" end Everything works fine. I can retrieve records without issue. However, when create a new
2008 Nov 19
2
Where should I put "prerequisite logic"?
Hi there, I have this model called InventoryItem. Every time an InventoryItem is created (through the CharactersController and the create_item action) I need to update others tables and make lookups in other tables, to check if the Character has the prerequisites to actually create the InventoryItem. My problem is that I cannot seem to find a good place to put this logic. I''ve tried to
2007 Nov 16
4
Newb - variable returns # sign?
Hi Gurus- I want to return the variety from the species table based on the active record link to inventory table class Species < ActiveRecord::Base has_many :inventories end class Inventory < ActiveRecord::Base belongs_to :species (this is the singular and the plural, so that''s OK) end My inventory_controller looks like: def show @inventory =
2007 Mar 13
6
comparing two databases with Active Record.
I have two databases in SQLite with the same schema. The other database was populated by an external customer and then returned. I want to use ActiveRecord to do the comparison. I am not sure of the best way to access the tables in each database with ActiveRecord models. I could change the connection dynamically whenever I want to switch between the databases, but this would seem to be clumsy
2005 Aug 08
68
Pluralized Controller Names?
If I do: script/generate controller Photo I get a controller named photo_controller. OTOH, if I do: script/generate scaffold Photo I get a controller named photos_controller. (Note that the controller name is pluralized). I realize that I''m specifying the controller name explicitly in the first case, but it seems odd to me that the scaffold command generates a pluralized
2007 Dec 18
2
Active Resource and non default model names
I have a model (accessed restfully) named TranscoderQueue, it''s name is overridden to ''TransocderQueue'' so it is accessed as ''/ transocder_queue'' as opposed to ''/transocder_qeueus''. class TranscoderQueue < ActiveRecord::Base belongs_to :campaign, :class_name => "Campaign", :foreign_key => "campaign_id"
2006 Apr 18
1
''wrong number of arguments'' for text_field?
This is probably something very simple but I can''t seem to figure out why I keep getting the ''wrong number of arguments (1 for 2)'' error with the following code when I try to create a new record. If anyone can see what is going wrong here please help! new.rhtml ------------------------------------------------- ... <%= start_form_tag :action =>
2017 Nov 08
3
Possibly [OT] ansible vmware inventory plugin
This might be OT, but it is CentOS related.? I've been running Ansible on C7 for a handful of months now, and updated to 2.4 as soon as it was available. I've been building inventories by hand in that time (mostly due to the fact we had no actual documentation on the managed external customer servers). However, as we have a multiple VMware clusters, thought it might be time to tinker
2007 Feb 03
7
Interesting radio button behavior with "onclick"
Hello: I have radio buttons like this: <% fields_for :goalhist do |g| %> <table> <tr> <td align=left><%= radio_button_tag (''duedate'', 0, checked = false, options = {:onclick => ""}) %> &nbsp;&nbsp;Start now </td> </tr> <tr id="detailed" style="display: none"><td colspan=2>
2005 Oct 04
2
newbie questions - looping through hierarchial datafille
Dear List, Im new to R - making a transition from SAS. I have a space delimited file with the following structure. Each line in the datafile is identified by the first letter. A = Inventory (Inventory) X = Stratum (Stratum_no Total Ye=year established) P = Plot (Plot_no age slope= species) T = Tree (tree_no frequency) L = Leader (leader diameter height) F = Feature (start_height finish_height
2007 Feb 16
13
negate the regexp in validates_format_of
Railsters: ActiveRecord''s validation system puts other database systems to shame. However, the newbies might not know how to write a regexp that excludes a match, instead of tests for it. Understand - I''m just asking this question to help them. I have been using Regexps since ''grep'' on Xenix! But the newbies here might not know how to do this:
2006 May 22
3
rails naming convention for model: community
Hello, How does Rails deal with the pluralization of community. I have "community" as my model name. Will Rails automatically look for a table name "communities" or do I have to name the table "communitys"? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Nov 28
11
New Rails Site: Wordie
My latest stupid web trick, built, with love, in Rails: http://wordie.org Make lists of words. See who else likes the same words. Basically, it''s a dating site. Built on thanksgiving while half-watching football and launched yesterday. In other words, half-baked, but I thought some of you might find it mildly amusing. John ____________________________ John McGrath Squirl: a site for
2006 May 12
2
Pluralization of non-noun names
People, I have an insurance company client and for the last eleven years I have wanted to completely redevelop their system from scratch. However, the boss has never been interested in hiring a team to develop the new system (partly because of the cost and partly because of some famous and expensive development failures in the industry) and has always insisted on incremental development of the
2007 Feb 13
5
default database schema and relationships
hi everyone.. i''m a high school teacher who wrote a webapp in PHP and MySQL for my curriculum.. i use it to keep attendance, take notes per student or class and keep track of activities. i would like to soup it up and have read both the pickax and version 2 of agile web dev... now i''m starting to work and i''d like to rename columns and relationships in the database so
2007 Feb 04
10
where to install script.aculo.us ?
I''d like to try autocompletion, and my understanding based on AWDWR:2, and on various website tutorials, is that I should install the script.aculos.us javascript library. My question is how to do that. The instructions on their site tell me to "Put prototype.js, scriptaculous.js, builder.js, effects.js, dragdrop.js, slider.js and controls.js in a directory of your website,
2013 Nov 25
1
Independent variable dependent on offset in GLMM
Hi! I’m running glmer (lme4) models with biodiversity data and I’m having trouble with understanding/finding information on how the offset() option is implemented. Explicitly, I’m wondering if the offset is only implemented on the dependent variable (as I think it is), or does it also affect independent variables in the model (was told this by a stat guy at our department)? My data is
2007 Dec 13
4
please explain find_with_ferret, retrieve_records, :include and :conditions
Hello, I''m using find_with_ferret to search multiple models and it works great. The trouble is I need to filter the results using :include and :conditions. I get two errors depending on the syntax I use in the search. Reading the source, I see the retrieve_records method seems to filter the :include and :conditions so that they only apply to the relevant model when searching