similar to: using migration--newbie

Displaying 20 results from an estimated 400 matches similar to: "using migration--newbie"

2006 Jul 31
10
nothing uploads.....why? (newbie question)
Hi everybody, I know this is an easy question but I don''t seem to see the solution. I''m trying to have a user select a file so that my code can parse it and populate the database with corresponding values. So far it seems like uploads but nothing shows in my db. Can anybody give me a hand? thanks view: h1>Importing Strings<h1>
2006 Jul 21
1
Newbie Question about Ruby on rails---cant upload data
Hi everybody, Ruby on Rails is my first programming lenguage...it looks to me like i''m missing the big picture. I''m trying to upload a file into a database. In my app. my user needs to select a file and upload it...however I only want him to upload certain information from that file. I have written code to parse only string tables from that file. For example, the table
2006 Jul 23
3
Newbie: Display hierarchical Records in a view
Hi, I have two models: category and subcategory. (one to many relationship), and a controller ''home'' I''d like to display all the categories and their sub categories in the view: home\index.rhtml. I have a method in the ''home'' controller'' like this: def list_categories @categories = Category.find(:all) end This list all the categories
2006 Jul 13
2
Simple dropdown menu
Hi, I''m quite new to this language and I''m having trouble finding out simple things like a dropdown menu in rhtml. I know I have to use <% select_tag %> but I''ve read lots of different ways to put in the options so I''m a bit confused. Options are hard-coded for the menu I''m trying to create so no database is involved! Thanks v much! Bex --
2007 May 15
2
openURI not capturing pages from the same rails app
Hi, I am using standard Ruby library openURI to capture the HTML code from other pages. The problem openURI does not work for capturing pages from the same rails application. Here is the code: class CdCreatorController < ApplicationController require ''open-uri'' def generate lines = [] file = open("http://127.0.0.1:3001/cd_creator/product/1"){ |f|
2006 Aug 02
1
Ordering the many in a many to one relationship
I have a many-to-one relationship between a model named Category(one) and a model named Brands (one). How can I get ActiveRecord to order the brands by the "name" attribute? This seems like a simple question and I can think of long ways around it but there has go to be a way to do this by accessing @category.brands . Can anyone help? I tried the code below in the controller but it
2006 Jul 09
1
REST Interface
Is the REST Controller (for calling APIs through the REST interface) already built-in ?? Or, I have to generate one -- generate controller rest ?? MSN id: ICEMANyears@netscape.net -- Posted via http://www.ruby-forum.com/.
2006 Jul 12
1
Is it possible to reload all ActiveRecord objects
Hi all, I wander if it is possible to force reload of all ActiveRecord object''s of some class that are already loaded, something like Book.reload_all? I know that I am able to reload specific objects with reload method but I would like to reload all that are currently in memory. thanks in advance, Bojan -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. |
2006 Jul 14
2
db:migrate question
Hi, In my environment.rb, I have set: config.active_record.schema_format = :ruby Whenever I do a rake db:migrate, both db/development_structure.sql and db/schema.rb get generated. This shouldn''t happen should it? I thought I should only get db/schema.rb? Thanks, Jordan
2006 Jul 17
1
RJS template help
Does anyone know where I can find good documentation on how to use RJS template. I know I can do various things with the page object: page.visual_effect :shake, ''some_id'' Is there a list of method I can run on the page onject and what parameters they are expecting? I can''t find this anywhere. Thanks for your help. Thank You, Ben Johnson E: bjohnson@contuitive.com
2006 Jul 17
2
Getting the original url from a controller action method
Is there a simple way to get the original url which spawned a controller action, including any query parameters? Thanks in advance, Don Mc -- Posted via http://www.ruby-forum.com/.
2006 Aug 31
2
$_SERVER for rails?
Is there something similar for rails that is like $_SERVER in PHP? Something that gives you the hostname, etc. I tried using just host in my controller, because the documentation says there is a host method, and got an undefined method error. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2006 Jul 06
17
Linux distros
Is there any particular distro that seems to be most used among RoR developers on Linux? Any that might provide better support somehow for development of RoR apps? -- Posted via http://www.ruby-forum.com/.
2006 Jun 16
2
News posting system without a database
I need to create a news posting system without the use of a database. I''m going to create a file for each news post and have the view post each file in a specific directory as HTML. The newspost will contain: 1. A title. 2. A date. 3. The body. In the text file, I want line 1 to be the title, line 2 to be the date, and everything from line 3 on down to the be the body. What method
2010 Oct 20
2
How do i use button_to_function
Hii all , I am trying to create a button that, when clicked on, calls a method in a controller . I am thinking that button_to_function is good to use for that i made htnl viwe like <h1>File Upload</h1> <p><label for="upload_file">Select File</label> : <%= file_field ''upload'', ''datafile'' %></p>
2010 May 28
3
Beginner Facing Problem with rake db:migrate
I am beginner for this Rails from the past 2 days I am working hard to fix the following error C:\Murali Rubby\demo\library>rake db:migrate --trace (in C:/Murali Rubby/demo/library) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == CreateBooks: migrating ==================================================== --
2010 Mar 29
4
error in uploading file(help me urgnt)
when i tried to crate an upload file application in rails i am getting error like this Template is missing Missing template app\views\upload\uploadfile.html.erb in view path app/views this is ma model class DataFile < ActiveRecord::Base def self.save(upload) name = upload[''datafile''].original_filename directory = "public/data" # create the
2006 Apr 05
1
send_file VS. send_data (performance)
Does anybody know if there is a big performance/time cost difference between these two methods of serving a file: ------------------------------- #1 ----------------------------------------- send_file "test.png", :type => ''image/png'', :disposition => ''inline'' ------------------------------- #2------------------------------------------
2009 Apr 21
1
[PATCH server] add dns setup clarification in installer
This clarifies the dns setup section in the installer and notifies to use the bundled dns setup if the management server is not in the upstream dns already --- installer/bin/ovirt-installer | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/installer/bin/ovirt-installer b/installer/bin/ovirt-installer index 2d88886..862c5e2 100755 --- a/installer/bin/ovirt-installer +++
2006 Jul 13
10
Book Question on RoR
Hi there, I am a newbie and interested in learning Ruby on Rails. I see there are 2 books out there: Ruby for Rails Ruby techniques for Rails developers David A. Black and Agile Web Development with Rails : A Pragmatic Guide (Pragmatic Programmers) Dave Thomas, David Heinemeier Hansson, Andreas Schwarz, and Thomas Fuchs Which one should I get? "Agile Web Development with Rails"