similar to: The M in ORM

Displaying 20 results from an estimated 6000 matches similar to: "The M in ORM"

2007 Dec 10
15
Scaffolding for pre-existing database table in 2.0.1
Hi, first of all I will apologize in advance for my presumably noobish question, but I''m only starting to learn Rails and am a little confused with all the changes in 2.0.1. There are as good as no tutorials out yet and the 2 or 3 screencasts I''ve seen deal with the creation of both the app and the database. Now my problem is that I already have a database with a fair amount of
2012 Jul 24
4
Behavior of first_or_create
I just ran across a weird glitch (IMHO) in find_or_create. The arguments passed to it are *not* added to the conditions for the ''first'' part. This is odd, given that it''s intended to replace find_or_create_by_* methods, which *did* use the specified values as conditions. I''m unsure on whether this behavior is entirely undesirable, but it''s definitely
2007 Dec 12
3
merbful_authentication
Since there are so many efforts at the moment to port restful_authentication I figured I''d put a repo up so that it can be a collaborative effort. You can pick up a copy of the repo at git clone http://snatcht.com/git/merbful_authentication.git at the moment the app is in a branch. Not in the master. get the branch by git checkout -b remote/initial origin/inital_repo At the moment
2006 Mar 09
3
Building a model from a database view
Hi, I''m trying to use rails to build a model from a database view. I get this output C:\dev\v6\project>ruby script/generate scaffold Assignment ... error Before updating scaffolding from new DB schema, try creating a tab le for your model (Assignment) Is this not possible in Rails? It would be *really* helpful for my application. -------------- next part -------------- An
2006 Mar 09
8
Problem with scaffolding and table name
Hello, i''m new in ruby rails framework. I have the following problem. I try to create a scaffold for a certain model of my db, but since ruby rails doesn''t assume the table name corectly (its incidents_reported ) i get errors .... Besides renaming the table :) is there a way to ''tell'' ruby rails the name of the table? I haven''t been able to find any
2005 Dec 22
3
foreign_key setting ignored
I''m having a spot of bother creating a ''has_many'' relationship between two legacy database tables. The relationship is ''company'' table has many linked records in the ''contact'' table. Iv''e used ''generate scaffold'' on these tables and everything is fine. I then decided to define the relationship in the
2005 Dec 28
5
simple scaffold question
How do I get scaffold to generate code for a table whos name is not plural of the modelname I give to it. I.E., If I have an existing database, and wish to generate scaffold code for existing tables, is this possible??? _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2007 Oct 15
18
Merbivore.com - Mockups
There''s been some discussion on the IRC channel about getting a site for Merb going. Since the culture around the project is pretty casual, I figured I''d just throw a few ideas together, see what you guys think. So, firstly here are three example pages, just to show off the general look and feel. http://mr-eel.com/tmp/merb/01_frontpage.gif
2006 Jan 31
2
How did I end up with read-only access?
I''ve generated the standard scaffolding half a dozen times on play databases on my own machine, but now I''m trying it for real against the team''s development database (postgres) and I see to have ended up in some sort of read-only mode. "list" will show my existing records and "show" will drill down, as expected, but "New" or
2006 Jul 03
9
Migrations from Mysql to Oracle. PLS HELP!
Hi all, I''m using Rails/Mysql as development platform. the production server is under Rails/Oracle. Right now, i''m trying to install my application under the production server, the connection to orcale is fine via Rails, but i have a weird problem. example : here is a extract from my db scheme : Table User :_____________ id_user | first_name |
2005 Mar 23
2
0.11 problems
I''ve upgraded to 0.11 this morning specifically to test out the pagination stuff. When that didn''t work (didn''t recognise the command) I deleted my project and recreated from scratch. So in short rails projectname cd projectname edit config/database.yml (my database is postgres by the way) ruby scripts/generate model Recordtype ruby
2007 Aug 30
1
active record alternatives
Just wanted to get the opinion from merb users on active record alternatives that you are either using or watching. I''ve been reading a bit about sequel and data mapper. Both look pretty nice. Anyone actively using those yet? Any others? If anyone cares to provide their thoughts, I''d love to hear them. BTW - is this too off-topic for this list? If so, just let me know and
2006 Apr 11
7
Undefined Method
Where can I define the method ''tbluser'' in this error? NoMethodError in Tblregisteredphone#list Showing app/views/tblregisteredphone/list.rhtml where line #23 raised: undefined method `tbluser'' for #<Tblregisteredphone:0x375c778> Extracted source (around line #23): 20: </font> 21: </td> 22: <td> 23: <%= link_to
2006 Jul 18
2
Scaffold a Plural table w/ No Pluralization in environment
Hi guys, I have a situation here. I have my project set to no pluralization due to legacy tables in environment.rb. Now, I have some new tables which I''m starting to pluralize. When I do a generate a scaffold to this new table: script/generate scaffold my_tables table it seems to work out fine for certain sections like http://mysite.com/railsapp/new (which also inserts properly to
2012 Dec 13
23
make rails connect with database
i''m newbie in rails. i have problem with how to connect rails with database. before i can connect it with command "rake db:create" to create database. and "rake db:migrate" to migrate schema to database. but, i want to connect rails with database that i have before, not create it via rails. can you help me? -- Posted via http://www.ruby-forum.com/. -- You received
2008 Apr 09
6
Using Ruby on Rails with existing database
Hi, I''m a complete newbie to this, I''m afraid. Apologies if this has been answered elsewhere, but I''ve had a look, and can''t find the answers I''m looking for, especially for using Rails 2.0. We have an existing database which we would need to connect Rails to, and the database structure is not what Rails would seem to expect. Firstly, tables are not
2007 Nov 27
2
Expectations on Class Methods
Sorry about the non-specific subject. Here''s what I''m trying to do. I have a method: DataMapper::Database.setup That I want to create an expectation on. I wrote: DataMapper::Database.should_receive(:setup).once.and_return (connection_hash) The call to setup is invoked in the "Object" namespace. I.e., it is setup code, and not in any method or class. I can see
2006 Jul 28
2
Scaffold and Undercores in Tablenames
I am attempting to generate scaffolds on legacy tables that have underscores in the name. Scaffold does not see the underscore. I have tried a backslash escape but it no work. I have looked around but i cannot find a way to make it work. It''s like this: c:\railroad>ruby script/generate scaffold FOO_BAR exists app/controllers/ exists app/helpers/ create
2011 Mar 18
7
Controller Spec & DataMapper Chaining
Hi there, I''m fairly new to RSpec, and DataMapper and I''m trying to write a controller spec for an index action that will include DM query chaining. Here is a very simplified version of the Controller#index I''m working on def index @widgets = Widget.all(:order => [ :name.asc ]) if params[:alpha] @widgets = @widgets.by_alpha(params[:alpha]) elsif
2009 Mar 31
15
Error: undefined method ''calc_min'' for #<Wx::IdleEvent>
Hi, I occasionally had the following error when application in idle state. Error: undefined method ''calc_min'' for #<Wx::IdleEvent:0xb115e44> OS: WXMSW Ruby Version: 1.8.6 wxRuby 2.0.0 Backtrace: (eval):154:in `calc_min'' (eval):154:in `layout'' (eval):154:in `process_event'' (eval):154:in `on_run'' (eval):154:in