[Rails] code help for implementing online exam please

2008-09-26 Thread Rup Rizal
Hi, I have been trying to write code for making an online exam management system. I could not think about a logic to implement the actual exam. Here is the problem: I have a questions table with fields like- id, question, opt1, opt2, opt3, opt4 and correctans. I want to read all the records from t

[Rails] Re: Image resize on the fly.

2008-09-26 Thread Rodrigo Fuentealba
2008/9/27 Abhishek shukla <[EMAIL PROTECTED]>: > Hi guys is there any Javascript library is there which can help me to resive > the image on the fly.. > -- Rodrigo Fuentealba --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[Rails] Image resize on the fly.

2008-09-26 Thread Abhishek shukla
Hi guys is there any Javascript library is there which can help me to resive the image on the fly.. Regards Abhishek shukla. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to thi

[Rails] Re: jquery, format.js and IE

2008-09-26 Thread Bryan M.
> did you try relaying on the request type per se, > without the .js on the url? Taking the .js off the url just triggers the html response. I can append the url with the query string /?format=js (as if i had written "link_to resource_path(@resource), :format => js") but I run into the same p

[Rails] Re: Very Newbie Question - script/generate model

2008-09-26 Thread Chris To
Hi all, I am still experiencing this problem. I tried installing the latest version of RoR and mogrel again, but I am still experiencing this problem. If anyone has any idea as to why this may be happening, please reply! I'm really excited about my first journey into RoR and web programming,

[Rails] render custom mime types

2008-09-26 Thread Nate Leavitt
So I have this in my environment.rb file: Mime::Type.register_alias "text/html", :help Then in one of my views I have this: <%= render :partial => formatted_summary_account_path("help") %> In my view folder I have _summary.help.erb When pulling up summary.erb I get this error: ActionView::M

[Rails] Preventing Mongrel/Mysql Errno::EPIPE exceptions

2008-09-26 Thread Mike Berrow
I have a rails app serving up XML on an infrequent basis. This is being run with mongrel and mysql. I've found that if the app does not get exercised for longer than a few hours it goes dead ("Lost Connection to MySQL") and starts throwing Errno::EPIPE errors. It seems that the mysql connection ge

[Rails] Re: Problem with authentication... Acts As Authenticated

2008-09-26 Thread Robert Walker
Firefox > Session ID: > BAh7BiIKKmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo > SGFzaHsABjoKQHVzZWR7AA==--5a5630c016ccd9482ce679e272d3d53adea86595 Perl > Session ID: 6ef6e5b8289004d925517d48294f1cc1 Give the vast difference between these two Session IDs it makes me wonder if that is

[Rails] Re: Beginners and fool-proof installation ? ? ?

2008-09-26 Thread Pardee, Roy
The 'w' in wamp means you're on windows, right? If so--install ruby from the one-click installer: http://rubyinstaller.rubyforge.org/ Then open a command prompt and say: gem update --system and when that's done: gem install rails and optionally, when that's done: gem install mongrel

[Rails] Problem with authentication... Acts As Authenticated

2008-09-26 Thread Julien Genestoux
Hello, I am working on the API of our webservice. API users need to authenticate some of their calls... When I am performig the call through Firefox, everything is fine as shown in the log : Processing OwnershipsController#new (for 67.207.118.174 at 2008-09-26 16:20:03) [GET] Session ID: BAh7B

[Rails] Beginners and fool-proof installation ? ? ?

2008-09-26 Thread unclebob100
First off - rememebr We are ALL not rocket scientists. The concept is great but the docs fall short for us rookies . . . You would have a HUGE user base if you could get back to SIMPLIFYING the installs. BIG Question : I have Apache, PHP, and mySQL running fine. How do I get Ruby on Rails up

[Rails] redundancy in method_missing

2008-09-26 Thread Aryk Grosz
Looking through the rails core code, I see method_missing performed like this a lot: def method_missing(method, *args) if block_given? current_status.send(method, *args) { |*block_args| yield(*block_args) } else current_status.send(method, *args) end end Why not just

[Rails] Re: Saas design considerations

2008-09-26 Thread Victor Al
Benjamin, Not only do I think that what you are doing is indeed "shameless self promotion", but I think that you are seriously misunderstanding the concept of SaaS and promoting bad information about RoR and SaaS on the web. Did you read through the points John asked about above? He is askin

[Rails] Re: Track number of clicks on a link

2008-09-26 Thread Dan Paul
Ar Chron is right, I should just put some sort of voting system in place, guess I was trying to take the easy way out. Back to the drawing board, thanks everyone for your help On Sep 26, 9:08 am, Ar Chron <[EMAIL PROTECTED]> wrote: > Dan Paul wrote: > > Hello, > > > So I am trying to simply trac

[Rails] Re: format.xml not rendering associated model properly

2008-09-26 Thread chovy
On Sep 26, 9:27 am, Ar Chron <[EMAIL PROTECTED]> wrote: > If you want only @directories, then you should create an rxml template > to be used under software, where you marshall the xml data is any old > format you want. > > for directory in @directories > xml.directory do > xml.directory_n

[Rails] form_for -> put/post problem

2008-09-26 Thread scott
I am having trouble getting form_for to use method :put for my edit view which has been driving me crazy. in the controller i have User.find, not User.new so i can't figure out why this always generates a method post. i have tried the following and they all generate method = post, even when i spe

[Rails] Re: Database optimization approach

2008-09-26 Thread Harold
Agree with Erol. Leave the schema as it is, and use proper DB indexes to help with performance. It is posts that belong to groups, not comments. Right? On Sep 26, 1:24 pm, Erol Fornoles <[EMAIL PROTECTED]> wrote: > On Sep 27, 12:47 am, elioncho <[EMAIL PROTECTED]> wrote: > > > Hello everyone, >

[Rails] Re: directly calling an action

2008-09-26 Thread Erhard Karger
Hi Thank You a lot. I took the first aproach and filled the div with a partial initially with (remote_form_for) in create I call a format.js with : file : create.js.rjs page.replace_html :constraintCont, " " page.insert_html :bottom, :constraintCont,:partial => "list", :object => @constraint

[Rails] Re: Capistrano SVN help: conflicting copies on prod and loca

2008-09-26 Thread Dave Amos
I didn't realize there was a deployment forum. I'll ask this there, where it's more appropriate. Mods can delete this if they wish. Sorry bout that. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscri

[Rails] problem with will_paginate and total_pages

2008-09-26 Thread KC
I think I am observing a bug with the total_pages count returned from my will_paginate collection. Or, is there some other page count I can use that is more reliable? I have a paginated list with a search box that is used to filter the list. The search string generates a :conditions clause that

[Rails] Re: Can not generate WSDL

2008-09-26 Thread Sharad Jain
It also happens with rails-2.1.0 + soap4r-1.5.8 + datanoise-actionwebservice-2.1.0 Fred Penz wrote: > I figured out this problem occures when loading soap4r after rubygems > in boot.rb: > require 'rubygems' > gem 'soap4r' > > If you comment out the gem 'soap4r', you'll be able to get your wsdl

[Rails] Re: ERROR: RDoc documentation generator not installed!

2008-09-26 Thread Sergio Ruiz
duh.. i am answering my own question.. but just in case anyone else has this problem.. this is a centos system.. you have to install rdoc separately.. yum install ruby-doc -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this messag

[Rails] ERROR: RDoc documentation generator not installed!

2008-09-26 Thread Sergio Ruiz
i am installing rails on a new machine, and during each of my gem installs, i am getting this: 1 gem installed ERROR: While executing gem ... (Gem::DocumentError) ERROR: RDoc documentation generator not installed! anyone have any ideas? -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Re: Iterate over an array with the index?

2008-09-26 Thread Phillip Koebbe
Joshua Muheim wrote: > Hi all > > Is there a method to iterate over an array with the index? Something > like > > my_array.each_with_index do |obj, index| > ... > end > > Just couldn't find such a method... maybe I worked too much today... ;-) > > Thanks > Josh Hi Josh, I agree that you wo

[Rails] Re: Iterate over an array with the index?

2008-09-26 Thread Erol Fornoles
On Sep 27, 1:36 am, Joshua Muheim <[EMAIL PROTECTED]> wrote: > Hi all > > Is there a method to iterate over an array with the index? Something > like > > my_array.each_with_index do |obj, index| >   ... > end > > Just couldn't find such a method... maybe I worked too much today... ;-) > > Thanks >

[Rails] Re: join model misery

2008-09-26 Thread paresh mathur
So what do you suggest i should do create the join table with the model of hand fill it. On Fri, Sep 26, 2008 at 9:22 AM, Frederick Cheung < [EMAIL PROTECTED]> wrote: > > > > On Sep 26, 5:05 pm, rick_2047 <[EMAIL PROTECTED]> wrote: > > I have two models Event and Category in my rails app. > > I w

[Rails] Re: Migrations

2008-09-26 Thread Jon Liu
Craig, It worked. Thank youplease excuse me while I go shoot myself for not trying that already. It's funny restarting the console has worked in some instances like this before...but I was lazy and did "reload!" instead. Rails is funny... Thanks again Jon On Fri, Sep 26, 2008 at 10:38 AM,

[Rails] Re: Migrations

2008-09-26 Thread Jon Liu
you know that might be a good idea... On Fri, Sep 26, 2008 at 10:37 AM, Erol Fornoles <[EMAIL PROTECTED]>wrote: > > > > On Sep 27, 1:33 am, "Jon Liu" <[EMAIL PROTECTED]> wrote: > > I'm just loading it like this: > > > > >>Review > > > > Review(id: integer, productReview:text, product: string, pro

[Rails] Re: Migrations

2008-09-26 Thread Erol Fornoles
On Sep 27, 1:33 am, "Jon Liu" <[EMAIL PROTECTED]> wrote: > I'm just loading it like this: > > >>Review > > Review(id: integer, productReview:text, product: string, productCreator: > string, created_at: datetime, updated_at: datetime) > > It's strange, I added an identical id to another structure

[Rails] Iterate over an array with the index?

2008-09-26 Thread Joshua Muheim
Hi all Is there a method to iterate over an array with the index? Something like my_array.each_with_index do |obj, index| ... end Just couldn't find such a method... maybe I worked too much today... ;-) Thanks Josh -- Posted via http://www.ruby-forum.com/. --~--~-~--~~-

[Rails] Re: Migrations

2008-09-26 Thread Jon Liu
I'm just loading it like this: >>Review Review(id: integer, productReview:text, product: string, productCreator: string, created_at: datetime, updated_at: datetime) It's strange, I added an identical id to another structure called Album, well I added "review_id", and it worked out fine. On Fri

[Rails] Re: Migrations

2008-09-26 Thread Erol Fornoles
On Sep 27, 1:04 am, "Jon Liu" <[EMAIL PROTECTED]> wrote: > thanks craig, > > I was able to generate the file w/the command and I added the "add_column" > code.  When I do my migrate I can see rail iteratively compiling the files > and I see the > > 4 add_column(:reviews, :album_id, :integer) > ->.

[Rails] Re: Database optimization approach

2008-09-26 Thread Erol Fornoles
On Sep 27, 12:47 am, elioncho <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I'll like to hear your opinion on the following issue. I have a posts > and post_comments table. Posts belong to a group, so there is a > group_id column on it. I want to query for all the post_comments of a > user for

[Rails] Re: undefined method `table_name' for REXML::Comment:Class

2008-09-26 Thread Frederick Cheung
On Sep 26, 5:51 pm, Neetin Kumar <[EMAIL PROTECTED]> wrote: > i am using rexml and try to find id from Comment table i got the error > Rexml's Comment class is shadowing your own. Either don't include REXML in the model that is doing this processing (so you'll need to prefix rexml classes with

[Rails] twitter outbound

2008-09-26 Thread joe
how can we send message to twitter account from our application.I am using twitter4r gem there is one message method in which we can post but it's showing me following error @twitter.message(:post, 'Are you coming over at 6pm for the BBQ tonight?', '@christy24') /usr/local/lib/ruby/gems/1.8/

[Rails] Re: Track number of clicks on a link

2008-09-26 Thread Phillip Koebbe
> def inc_link_count > li = Link.find(params[:ID]) > li.count++ > li.save > end To avoid multiple connections stepping on one another, you should consider using update_counters (or a custom method that does the same thing) instead of doing a find, modifying, and saving. Peace.

[Rails] Re: Migrations

2008-09-26 Thread Jon Liu
thanks craig, I was able to generate the file w/the command and I added the "add_column" code. When I do my migrate I can see rail iteratively compiling the files and I see the 4 add_column(:reviews, :album_id, :integer) ->.2970s 4 AddAlbumIdToReviews: migrated (0.3120s) which means that's it's

[Rails] Re: daemons gem vs cron jobs to execture rails code

2008-09-26 Thread Jodi Showers
Rich (and Fred) On 26-Sep-08, at 12:19 PM, Frederick Cheung wrote: > > > > On Sep 26, 5:13 pm, Rich Sturim <[EMAIL PROTECTED]> > wrote: >> I need help understanding the pros and cons of these 2 facilities. >> >> Am I correct in assuming that this daemon by definitive runs in the >> rails environ

[Rails] undefined method `table_name' for REXML::Comment:Class

2008-09-26 Thread Neetin Kumar
i am using rexml and try to find id from Comment table i got the error my code is like this XPath.each(new_article, 'comments') do |comments| XPath.each(comments, 'comment') do |new_comment| c_oldid = XmlMigratedData.find(:first,:conditions=>["model_type=? and e

[Rails] Database optimization approach

2008-09-26 Thread elioncho
Hello everyone, I'll like to hear your opinion on the following issue. I have a posts and post_comments table. Posts belong to a group, so there is a group_id column on it. I want to query for all the post_comments of a user for a specific group, so what I am doing now is a INNER JOIN between the

[Rails] Validate creation of both parent and child from same form?

2008-09-26 Thread Chris Bloom
Alternate subject title: Validate child of unsaved parent based on grandparent attr? I've got a create view with a form for both the parent object as well as multiple child objects. Upon submit, can I validate the parent and child objects before either are saved? There are a few caveats: 1.) The

[Rails] Re: Migrations

2008-09-26 Thread Craig White
On Fri, 2008-09-26 at 09:33 -0700, Jon Liu wrote: > ok thanks, but how do you actually generate that particular migrations > file from the command line?, ie it would be 004_something > script/generate migration some_name_of_what_you_re_trying_to_accomplish Craig --~--~-~--~~-

[Rails] Re: has_many / belongs_to associations

2008-09-26 Thread Jon Liu
how do you view the stacktrace? I thin this is the solution to my problem...only now migrations is acting funny with me... On Fri, Sep 26, 2008 at 7:27 AM, Frederick Cheung < [EMAIL PROTECTED]> wrote: > > > > On Sep 26, 3:18 pm, "Jon Liu" <[EMAIL PROTECTED]> wrote: > > I tried manually defining

[Rails] Re: Migrations

2008-09-26 Thread Jon Liu
ok thanks, but how do you actually generate that particular migrations file from the command line?, ie it would be 004_something On Fri, Sep 26, 2008 at 9:31 AM, Craig White <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-09-26 at 08:58 -0700, Jon Liu wrote: > > Craig, > > > > Yeah that sounds more f

[Rails] Re: Migrations

2008-09-26 Thread Craig White
On Fri, 2008-09-26 at 08:58 -0700, Jon Liu wrote: > Craig, > > Yeah that sounds more feasible rather than migrating down...I can > definitely confirm VERSION=0 will drop the table though because when > try to load the structure in the console it throws me an error. > > What would be the syntax t

[Rails] Re: daemons gem vs cron jobs to execture rails code

2008-09-26 Thread Rich Sturim
nice summary -- thanks! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com T

[Rails] Re: format.xml not rendering associated model properly

2008-09-26 Thread Ar Chron
If you want only @directories, then you should create an rxml template to be used under software, where you marshall the xml data is any old format you want. for directory in @directories xml.directory do xml.directory_name(directory.name) etc etc end end -- Posted via http://w

[Rails] Re: join model misery

2008-09-26 Thread Frederick Cheung
On Sep 26, 5:05 pm, rick_2047 <[EMAIL PROTECTED]> wrote: > I have two models Event and Category in my rails app. > I want a join model for many to many association so i used the script > > ./script/generate migration create_categories_events event_id:integer > category_id:integer > > but the mig

[Rails] Re: format.xml not rendering associated model properly

2008-09-26 Thread Ar Chron
What magic were you expecting to have happen? (Rails did exactly what you told it to). Don't you want something like format.xml { render :xml => @software.to_xml( :include => :directories ) } -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] join model misery

2008-09-26 Thread rick_2047
I have two models Event and Category in my rails app. I want a join model for many to many association so i used the script ./script/generate migration create_categories_events event_id:integer category_id:integer but the migration that is generated is empty. I am using rails 2.1.1. Can anyone t

[Rails] Re: daemons gem vs cron jobs to execture rails code

2008-09-26 Thread Frederick Cheung
On Sep 26, 5:13 pm, Rich Sturim <[EMAIL PROTECTED]> wrote: > I need help understanding the pros and cons of these 2 facilities. > > Am I correct in assuming that this daemon by definitive runs in the > rails environment, whereas a cron will have to load up a rail > environment each time and thus

[Rails] Re: Track number of clicks on a link

2008-09-26 Thread Ar Chron
Dan Paul wrote: > Hello, > > So I am trying to simply track the number of hits a link has received > and display that number on the site so other users can see which links > are more popular. Dare I mention that this method counts a link as popular even if the user arrived at the destination pa

[Rails] daemons gem vs cron jobs to execture rails code

2008-09-26 Thread Rich Sturim
I need help understanding the pros and cons of these 2 facilities. Am I correct in assuming that this daemon by definitive runs in the rails environment, whereas a cron will have to load up a rail environment each time and thus consumer for more resources than the daemons gem? -- Posted via http

[Rails] Re: Rake tasks + plugins

2008-09-26 Thread Alexey Skoblikov
Thank you very much! On 26 Септ, 18:44, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Sep 26, 4:13 pm, Alexey Skoblikov <[EMAIL PROTECTED]> wrote: > > > > > What is the simplest way to hook up the whole environment during the > > rake task? > > Make your task depend on the :environment task. >

[Rails] Problema con auto_complete

2008-09-26 Thread Juan Moreno
Nuevamente saludos a la comunidad tengo un problema con auto_complete, primero que nada lo instale de la siguiente manera script/plugin install auto_complete. luego hice el siguiente código: en mi vista tengo lo siguiente: <%= javascript_include_tag :defaults %> <%= javascript_include_

[Rails] Re: attachment_fu and acts_as_list - a land war in Asia

2008-09-26 Thread Philipe Farias
This is nice but I've done a little different...I created one class for the image and another for the thumbnails. For this solution you need to add :thumbnail_class => Thumbnail in the thumbnails hash and define the scope_condition in the easy way (and a has_many association too). --~--~-~

[Rails] Re: Migrations

2008-09-26 Thread Jon Liu
I'm sorry, it doesn't throw me an error, it says Review(Table doesn't exist) On Fri, Sep 26, 2008 at 8:58 AM, Jon Liu <[EMAIL PROTECTED]> wrote: > Craig, > > Yeah that sounds more feasible rather than migrating down...I can > definitely confirm VERSION=0 will drop the table though because when tr

[Rails] Re: Migrations

2008-09-26 Thread Jon Liu
Craig, Yeah that sounds more feasible rather than migrating down...I can definitely confirm VERSION=0 will drop the table though because when try to load the structure in the console it throws me an error. What would be the syntax to just add a change(thus adding a new migration then) I want to

[Rails] Re: Rake tasks + plugins

2008-09-26 Thread Frederick Cheung
On Sep 26, 4:13 pm, Alexey Skoblikov <[EMAIL PROTECTED]> wrote: > > What is the simplest way to hook up the whole environment during the > rake task? Make your task depend on the :environment task. Fred --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: Migrations

2008-09-26 Thread Craig White
On Fri, 2008-09-26 at 08:31 -0700, Jon wrote: > the VERSION value at in rake db:migrate VERSION=[versionNumber] is the > migration number right? for instance lets say I have 3 models > generated in this respective order albums, users, and reviews. If I > do "rake db:migrate VERSION=0", it will d

[Rails] Re: alternative to Google maps?

2008-09-26 Thread Gregory Seidman
On Fri, Sep 26, 2008 at 07:24:43AM -0700, Stedwick wrote: > at my company we want to add mapping to our application, and while > Google maps is clearly the most awesome mapping API on the planet, the > terms and conditions dictate that it must be free to all users. We are > thinking this means tha

[Rails] Rake tasks + plugins

2008-09-26 Thread Alexey Skoblikov
In my rake task I try to use the classes and methods defined in a plugin. Seems that plugins are not hooked up during the rake task run. Models are also not hooked up. I can require 'ModelName' I can require 'activerecord' But my Model depends a lot on the plugin (globalize) and initiation of t

[Rails] Re: Chaining two named_scope that have a block of code

2008-09-26 Thread Fernando Perez
Actually chaining 2 named_scopes that have :joins in them is not yet possible as of Rails 2.1.1, the issue is fixed and is available in Rails edge, or we'll have to wait until 2.2 is out. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You receiv

[Rails] Migrations

2008-09-26 Thread Jon
the VERSION value at in rake db:migrate VERSION=[versionNumber] is the migration number right? for instance lets say I have 3 models generated in this respective order albums, users, and reviews. If I do "rake db:migrate VERSION=0", it will delete the data and existence of all three tablesif

[Rails] Capistrano SVN help: conflicting copies on prod and local

2008-09-26 Thread Dave Amos
I'm sure this is an easy fix for folks more familiar with subversion than me, but here it goes: I'm running Capistrano and have successfully deployed my app from my local machine to my live server. The repository is on the server as well. What happened is I had to generate some files on the live

[Rails] Ajax live valiation on username

2008-09-26 Thread Neil Cauldwell
This has probably been definitively answered elsewhere (it applies to the default setup for restful_authentication), but I haven't been able to track the solution down. My User model has a unique 'username' (or :login, as it's known in RA) attribute, and it's going to be very annoying for users to

[Rails] Re: Chaining two named_scope that have a block of code

2008-09-26 Thread Fernando Perez
Fernando Perez wrote: > I solved it by appending the first method to the chain. > > > I have another problem: > > I want to chain 2 named_scopes that both have a :joins in their > definition. The problem is that the :joins of the second named_scope in > the chain doesn't get added to the quer

[Rails] Re: Track number of clicks on a link

2008-09-26 Thread Sazima
Hey Dan, Why don't you pass an unique ID parameter in each link (either GET or POST) and use this in a before_filter in the application controller? The filter would just increment the count for that ID in a separate table. This is a general design that would work for anything. Later you can use t

[Rails] Re: Calling Create action from a link_to

2008-09-26 Thread Tim Conner
Apologies, i must not have restarted the server after changing some routes. I've restarted and its behaving as expected now. Thanks for the help -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Re: With partial in a block is there any way to face "cycle" to restart?

2008-09-26 Thread Frederick Cheung
On Sep 26, 3:36 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > Problem is. the cycle does not "restart" after each loop of the block > so they get out of order if a preceding category has an even number of > products. is there any way to force the cycle back to "left" after > each pass?

[Rails] With partial in a block is there any way to face "cycle" to restart?

2008-09-26 Thread [EMAIL PROTECTED]
Im trying to display lists of products on a page which is split up into categories which is fine but, the way they are displayed is in a 3xwhatever grid so i was using cycle in my partial to set css styles for the spacing. [code] [/code] But then i split it up to also display the category name

[Rails] Re: has_many / belongs_to associations

2008-09-26 Thread Frederick Cheung
On Sep 26, 3:18 pm, "Jon Liu" <[EMAIL PROTECTED]> wrote: > I tried manually defining @album like so > >      id=1 >     [EMAIL PROTECTED](params[:review]) >     [EMAIL PROTECTED](id) >     [EMAIL PROTECTED] > > Because of this, I don't think it's that @album was not defined.  Also as I > brought

[Rails] alternative to Google maps?

2008-09-26 Thread Stedwick
at my company we want to add mapping to our application, and while Google maps is clearly the most awesome mapping API on the planet, the terms and conditions dictate that it must be free to all users. We are thinking this means that we must either use some other mapping software, or be sure to ma

[Rails] Re: has_many / belongs_to associations

2008-09-26 Thread Jon Liu
I tried manually defining @album like so id=1 @review=Review.new(params[:review]) @review.album=Album.find(id) @review.save Because of this, I don't think it's that @album was not defined. Also as I brought up before, and I think this is key in showing their is something fund

[Rails] Re: Calling Create action from a link_to

2008-09-26 Thread Jeff
On Sep 26, 8:21 am, Tim Conner <[EMAIL PROTECTED]> wrote: > Hi, > I have a Collection resource set up and I have configured my routes > file: > map.resources :collections > > I want to have a link which will create a new collection (instead of > adding one via the form in the New action).  I was u

[Rails] Re: Spider Charts and Gruff: THE JOY OF GRAPHING

2008-09-26 Thread Joe Peck
The more I look at this, the more it seems that I can't put concentric circles or the numbers. Am I wrong about this? Also, is there any way to add "bottom-margin" to a spider graph in Gruff? It doesn't look that way so far... -- Posted via http://www.ruby-forum.com/. --~--~-~--~---

[Rails] Re: How the url parameters are mapped to params hash?

2008-09-26 Thread Frederick Cheung
On 26 Sep 2008, at 14:15, Tushar Gandhi wrote: Hi, I have created the url "http://localhost:3000/groups/home?group_id=1&parent_id=3";. I have one method in which I am able to access the url parameters by using params[:group_id] and params[:parent_id]. My question is that how the params hash

[Rails] Re: Calling Create action from a link_to

2008-09-26 Thread Erol Fornoles
On Sep 26, 9:21 pm, Tim Conner <[EMAIL PROTECTED]> wrote: > Hi, > I have a Collection resource set up and I have configured my routes > file: > map.resources :collections > > I want to have a link which will create a new collection (instead of > adding one via the form in the New action).  I was u

[Rails] Calling Create action from a link_to

2008-09-26 Thread Tim Conner
Hi, I have a Collection resource set up and I have configured my routes file: map.resources :collections I want to have a link which will create a new collection (instead of adding one via the form in the New action). I was under the impression that I could just do a POST call to the collections

[Rails] creating routes to feeds

2008-09-26 Thread Tarscher
Hi all, I want to create rss feeds per user for his posts and events. Something like www.domain.com\2\posts\feed where 2 is the id of the user, posts is the model and feed indictaing that the requested format is rss. cansomeone give me a hint on how to do this in the routes? thanks Stijn --~--~

[Rails] How the url parameters are mapped to params hash?

2008-09-26 Thread Tushar Gandhi
Hi, I have created the url "http://localhost:3000/groups/home?group_id=1&parent_id=3";. I have one method in which I am able to access the url parameters by using params[:group_id] and params[:parent_id]. My question is that how the params hash is get created? and who creats this hash? Thank

[Rails] Re: how to send messages to mobile deveices from ruby on rai

2008-09-26 Thread Phillip Koebbe
Pokkai Dokkai wrote: > how to send messages to mobile deveices from ruby on rails ? One way, though maybe not the best depending on your needs, is to send an email to [EMAIL PROTECTED], such as [EMAIL PROTECTED] Peace. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~

[Rails] Re: Can anyone help? regarding simple_captcha plugin

2008-09-26 Thread Conrad Taylor
On Thu, Sep 25, 2008 at 11:02 PM, sadeesh kumar <[EMAIL PROTECTED]> wrote: > > simple_captcha does not work in test environment > --- > Hi, >I have been using simple_captcha and it works fine and make myself > happy. When

[Rails] Images are not shown on server / incorrect path

2008-09-26 Thread Stefan Kaehler
Hi folks, i'm new to ROR. My Application works fine on my local machine, but if i deploy my application the pictures and files are not shown correctly. Instead of taking the right uri "http://adress/employee_public/pictures//0010/not.gif"; it takes the uri "http://adress/pictures//0010/n

[Rails] Re: TDD and BDD

2008-09-26 Thread Sijo Kg
Hi Thanks for your reply Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegr

[Rails] Re: TDD and BDD

2008-09-26 Thread Phlip
Sijo Kg wrote: > Could anybody please tell me what these?BehaviouralDrivenDevelopment > and TestDrivenDevelopment ? what are their pros and cons? TDD means you never write new lines of code until you have a failing test case that expects the code to exist. A test case follows the Assemble

[Rails] how to send messages to mobile deveices from ruby on rails ?

2008-09-26 Thread Pokkai Dokkai
how to send messages to mobile deveices from ruby on rails ? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email t

[Rails] Re: rails -1.2.3 to 2.1.1 ? how ?

2008-09-26 Thread Pokkai Dokkai
Frederick Cheung wrote: > On Sep 26, 7:00�am, Pokkai Dokkai <[EMAIL PROTECTED]> > wrote: > If you are asking whether your old app will work after you freeze > rails 1.2.3 into the project and then upgrade your gems then yes. > That's the point of freezing. You 1.2.3 app won't use the new gems at >

[Rails] TDD and BDD

2008-09-26 Thread Sijo Kg
Hi Could anybody please tell me what these?BehaviouralDrivenDevelopment and TestDrivenDevelopment ? what are their pros and cons? And which is preferred by rails? Thanks in advance Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You recei

[Rails] Re: moving to Rails 2.x

2008-09-26 Thread berlin 2.0
X-No-Archive: yes Hi, this article helped me when updating: http://blog.insoshi.com/2008/07/03/a-rails-21-case-study-upgrading-the-insoshi-social-networking-platform/ Cheers On 26 Sep., 09:18, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Sep 26, 12:54 am, lunaclaire <[EMAIL PROTECTED]> wr

[Rails] Re: Rails DOM naming conventions?

2008-09-26 Thread David Trasbo
Frederick Cheung wrote: >> � � ... >> � >> >> >> I've been trying to Google a little around, trying to find an answer, >> but are there any official or semi-official naming conventions for id's >> and classes in the view out there? >> > Perhaps you are looking for the dom_id, dom_class, div_for

[Rails] Preloading resources

2008-09-26 Thread Jaikishan Jalan
Hello, This is a little general question. What is the best way to preload certain resources like stylesheet, some images etc before a page is rendered to user? -- Thanks, Jaikishan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] Re: Iterating through each record of a model and copy that to an

2008-09-26 Thread Frederick Cheung
On Sep 26, 7:28 am, Sijo Kg <[EMAIL PROTECTED]> wrote: > Hi >    I have to copy all the service desk cis to incident cis as part of > converting sd_ticket to incident..So in the Incident model I did > sd_ticket=ServiceDeskTicket.find(sd_id) > Then a new incident @incident is created here > sd_ci

[Rails] Re: moving to Rails 2.x

2008-09-26 Thread Frederick Cheung
On Sep 26, 12:54 am, lunaclaire <[EMAIL PROTECTED]> wrote: > Finally about to make the move from 1.2.6 to 2.? and am curious about > strategy... > > I've looked at a bunch of postings across the web about upgrading, but > many of them seem to be written back when 2.0 was only a RC and it > seems

[Rails] Re: rails -1.2.3 to 2.1.1 ? how ?

2008-09-26 Thread Frederick Cheung
On Sep 26, 7:00 am, Pokkai Dokkai <[EMAIL PROTECTED]> wrote: > Pokkai Dokkai wrote: > > now i am working in a rails project version 1.2.3 > > but i like to work in rails 2.1.1 > > i thing by freexe the 1.2.3 gemm into vendor will solve the problem > > but i have 35 plugin in my project(which is

[Rails] Re: Rails DOM naming conventions?

2008-09-26 Thread Frederick Cheung
On Sep 26, 8:04 am, David Trasbo <[EMAIL PROTECTED]> wrote: > When I'm making views in Rails I am using my own naming conventions for > dom id's and classes: > > >   >     Ruby on Rails >     Lorem ipsum dolor sit > amet. >   >   >     ... >   > > > I've been trying to Google a little arou

[Rails] Re: has_many / belongs_to associations

2008-09-26 Thread Frederick Cheung
On Sep 26, 5:53 am, Jon <[EMAIL PROTECTED]> wrote: > class ReviewsController < ApplicationController > >   def create >         @review=Review.new(params[:review]) >         @[EMAIL PROTECTED] >         @review.save >         redirect_to '/inventory' >   end The problem you have is that @album

[Rails] Rails DOM naming conventions?

2008-09-26 Thread David Trasbo
When I'm making views in Rails I am using my own naming conventions for dom id's and classes: Ruby on Rails Lorem ipsum dolor sit amet. ... I've been trying to Google a little around, trying to find an answer, but are there any official or semi-official naming conventio