[Rails] Testing a custom mime type

2009-07-20 Thread Alex
I've registered my mime type and set up a custom parser: Mime::Type.register application/plist+xml, :plist ActionController::Base.param_parsers[Mime::Type.lookup_by_extension (plist)] = Proc.new { |data| Plist::parse_xml(data) } Now how do I test this? When I do this:

[Rails] Model.destroy(array of ids) Bug

2009-07-20 Thread Sandip Ransing
Hello friends ! Model.destroy(array of ids) gives record not found error in Internet Explorer. Sandip R~ -- Ruby on Rails Developer http://sandip.sosblog.com http://funonrails.wordpress.com www.joshsoftware.com --~--~-~--~~~---~--~~ You received this message

[Rails] Re: Need Help! after upgrade rails to 2.3.2 it show empty p

2009-07-20 Thread Luigi
Maybe you have a bluehost hosting space? I founded the same problem and the only solution, that works 4 me, is to freeze the application to the version 2.2.2. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: How to call model that belongs to that controller

2009-07-20 Thread Gavin
Hi Models don't belong to controllers. They are two separate classes that, to make things more practical, often have a similar name. You could just as easily have a Post model and a BlogController and Rails wouldn't know the difference. If you're trying to guess the name of model from the

[Rails] Re: Intermittent routing problem

2009-07-20 Thread Sijo Kg
How did u create the controller employees and/or model employee? -- 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

[Rails] Re: Model.destroy(array of ids) Bug

2009-07-20 Thread Gavin
Sandip, Are you certain all of the ids are valid? You could try adding something like this to your controller action before the destroy is called: def destroy @records = Model.all( :conditions = [id IN (?), array]) raise Not all ids were valid! unless @records.size == array.size

[Rails] Re: admin rounting

2009-07-20 Thread Sijo Kg
You can take a look at namespace Just for an example map.namespace(:admin) do |admin| admin.resources :accounts end Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] Re: rake error

2009-07-20 Thread Gavin
Hey Could you paste the full trace and error? I doubt this is an error with your gem versions. Gavin http://handyrailstips.com On Jul 20, 6:56 am, jko170 jko...@gmail.com wrote: When I run rake test:units I get this error: 292 tests, 350 assertions, 2 failures, 13 errors rake aborted!

[Rails] Emails + Delete from Inbox

2009-07-20 Thread Cyrus Dev
Hello All, I need to know is there possible to delete emails from inbox using Net:POP3 in ruby I have tried to their function but its not working please help me thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: downloadable docs?

2009-07-20 Thread Gavin
Hey - you could also use: rake rails:freeze:gems rake doc:rails This will unpack rails to vendor/ and then build the entire API documentation in your /doc directory. I've used this in the past when I was away from an internet connection. To see the docs for any plugins you're using, use rake

[Rails] Testing: be_new_record

2009-07-20 Thread Matthias Baumgart
Hello, in the railscast episode 71, Ryan uses in a test be_new_record. Running tests with be_new_record causes a NameError: undefined local variable or method. The episode isn't on git and I didn't find the code. I installed rspec and mocha, but didn't find on google the origin of this

[Rails] render :file in another window

2009-07-20 Thread Erwin
is there a way to render a file in another window I wrote : def show @asset = Asset.find(params[:id]) respond_to do |format| format.html format.xml { render :xml = @asset } format.pdf {render :file = @asset.data.path } end end this render in the current

[Rails] Re: How to call model that belongs to that controller

2009-07-20 Thread Thriving K.
Thank you, i will try -- 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 To

[Rails] Re: render :file in another window

2009-07-20 Thread Sijo Kg
format.pdf {send_data(@asset, :filename = @asset.data.path, :type ='application/pdf',:disposition = 'inline') } Sijo -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: How to Disable Pluralization

2009-07-20 Thread Franco Catena
You can rewrite the inflections using ActiveSupport::Inflector.inflections (http://api.rubyonrails.org/ classes/ActiveSupport/Inflector/Inflections.html) and do something like mapping the plural of all words to the same word. Regards. Franco Catena. On Jul 18, 4:24 am, harun harun...@gmail.com

[Rails] Re: Testing: be_new_record

2009-07-20 Thread Gavin
Rspec has a really cool feature where, if you assert that something should be_something_else it'll assume there's a method called something_else? So for example; Suppose you had a model called Sushi. In your spec you could write: describe Sushi do it should be awesome @sushi.should

[Rails] Re: render :file in another window

2009-07-20 Thread erwin
Thanks Sijo I also found that I could use the :popup = true in the 'link_to' On 20 juil, 12:45, Sijo Kg rails-mailing-l...@andreas-s.net wrote: format.pdf {send_data(@asset, :filename = @asset.data.path, :type ='application/pdf',:disposition  = 'inline')   } Sijo -- Posted

[Rails] Re: Help with gsub

2009-07-20 Thread Brian Penrose
Marnen Laibow-Koser wrote: Brian Penrose wrote: I have a string of state codes (ie 'MD,PA,VA,WV') i'm passing from a select list (:allow_multiple = true), in which I'm trying to replace the commas with ','. I have the following gsub, which works fine in irb, however in Rails it's returning

[Rails] Re: CSS issue when using SubUri and Passenger

2009-07-20 Thread erwin
SOLVED ... discover some CSS link redefinition missing the relative URL root !! On 20 juil, 13:47, Erwin yves_duf...@mac.com wrote: I am testing another application in local in my environment.rb  I wrote config.action_controller.relative_url_root = /elnino

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Älphä Blüë
Thanks guys - I'm going to look at cleaning this up a bit. The 120 stems from the fact that there will always be exactly 120 teams (well until the year 2012-2013) when South Alabama joins Div. 1. My initial problem started when I didn't understand how to organize two arrays into a hash of

[Rails] Re: Model.destroy(array of ids) Bug

2009-07-20 Thread Sandip Ransing
Sorry, my mistake ! Actually IE brawser was submitting request twice to delete action. hence..in second request it was showing record not found exception. --Sandip R~ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Älphä Blüë
Okay I just want to make sure I understand this better. schedules = Schedule.find(:all) schedules.each do |schedule| puts Team Id = #{schedule.team_id} end That shows me all the team_ids listed in the schedules table. Now what if I want to iterate through those team_ids and collect all of

[Rails] Re: How to call model that belongs to that controller

2009-07-20 Thread Bryan Ash
In Ruby there is always something called self. It's really worth understanding what it is at any given time. Dave Thomas gave a presentation on the Ruby Object Model at Scotland on Rails this year. The video is available: http://scotland-on-rails.s3.amazonaws.com/2A04_DaveThomas-SOR.mp4

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Rick
Why don't you just set the model up where you find Teams and each Team has a collection of Team objects called 'opponents'? It would seem to be a lot easier to me this way. On Mon, Jul 20, 2009 at 9:07 AM, Älphä Blüërails-mailing-l...@andreas-s.net wrote: That shows me all the team_ids listed

[Rails] Re: rdiscount Deadlock !

2009-07-20 Thread Matt Jones
On Jul 19, 11:04 pm, Manish Arya rails-mailing-l...@andreas-s.net wrote: yea, because in environment.rb its clearly mentioned config.gem rdiscount,    :version = 1.3.1.1 but at the time of installing rdiscount it wants version = 1.3.1.1 Were you expecting something else? That's what

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Älphä Blüë
Hi Rick, I want to do it exactly the way you are saying but I think I'm just a bit confused here. Let me show you what I'm working with now: schedules = Schedule.find(:all, :joins = [:team, :opponent], :order = :team_id) schedules.each do |schedule| puts Name = #{schedule.team.name} and ID

[Rails] Re: Problem with routes.rb in rails 2.3.2

2009-07-20 Thread sultan
Matt, thanks for you response. Initially I thought the problem was with locale, but I am using the default locale and have not changed anything in the configuration. Eventually, I created a new rails 2.3.2 project and added my application, one controller at a time. At each step I ran rake routes

[Rails] Re: Runing Rake Error

2009-07-20 Thread Matt Jones
It will be much easier for this list to help you if you post the full trace output of Rake, as suggested by the command (run with --trace option) --Matt Jones On Jul 19, 5:40 am, Komla ckb...@yahoo.com wrote: Hi everybody, I am trying to run rake command rake db:migrate and I got rake

[Rails] Re: Serialization problem

2009-07-20 Thread Joe C
Upon closer review... and a weekend to clear my head... This approach was just flat wrong. Don't even think of serializing activeRecords. It causes all sorts of problems, some you will see, some will be beneath the water line. I found memcached and after reading about it, it is exactly what

[Rails] Re: Ruby 1.9.1 One-Click Installer for Windows

2009-07-20 Thread bill walton
Hi Rohit, On Mon, 2009-07-20 at 06:42 +0200, Rohit Chauhan wrote: - Latest Ruby 1.9.1 One-Click Installer with No-Hassle Rails Installation

[Rails] Re: Equipment_URL Failed to Generate (new_equipment_path)

2009-07-20 Thread Ben Wilson
I already have the controller, model and views. The new_equipment_path generates a URL when presenting the view. However, going to the /equipment/new URL (generated by the helper) generates the error. Rails pluralizes Equipment to Equipment. I picked that up from researching the problem on this

[Rails] Adding a view (newby question)

2009-07-20 Thread Jason Cheung
How do you add an extra view? I have new, edit, show, etc.. I'm having trouble using RESTful paths. new_viewname_path works for linking to the new view but if I try something like myview_viewname_path I get an error: undefined local variable or method `myview_viewname_path' Can anybody help? --

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Älphä Blüë
Rick, I was also looking at your example - this is what I would like to do: schedules = Schedule.find(:all, :joins = [:team, :opponent, :tsos_offense], :order = :team_id) schedules.each do |schedule| val = 0 schedule.opponents.each do |opponent| if opponent.id == nil val +=

[Rails] Re: Ruby 1.9.1 One-Click Installer for Windows

2009-07-20 Thread Shahin Kordasti
Thanks alot mate, was waiting for this. -- 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

[Rails] Re: Adding a view (newby question)

2009-07-20 Thread Max Williams
Jason Cheung wrote: How do you add an extra view? I have new, edit, show, etc.. I'm having trouble using RESTful paths. new_viewname_path works for linking to the new view but if I try something like myview_viewname_path I get an error: undefined local variable or method

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Älphä Blüë
Let me take a step back here and look over my associations: Are they setup incorrectly? I want team to be my core object always.. class Team ActiveRecord::Base has_many :schedules has_many :inheritance_templates has_many :opponents, :through = :schedules has_many :tsos_offenses

[Rails] Re: Concerns about multiple model queries and array management

2009-07-20 Thread Älphä Blüë
class TsosSpecialTeams ActiveRecord::Base belongs_to :team end .. is actually supposed to read: class TsosSteams belongs_to :team end -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Rails] Simple Search Methode - newbie question.

2009-07-20 Thread salai
Dear All, Can you guide me how can i implement a search function in my simple Bookmark program. In my Bookmark I have title and url, description. What I want to do is search_by title. many thanks in advance, regards, koko --~--~-~--~~~---~--~~ You received this

[Rails] Re: Mongrel Server error - newbie question.

2009-07-20 Thread salai
I was able able solve the problem ... On Fri, Jul 17, 2009 at 5:38 PM, nuamsaya...@gmail.com wrote: Dear All, I am very new to RoR. I have got the following error after Chnaging mysql database.yml and restart the Server. - rails employee rails -d mysql employee and insert Username

[Rails] Re: Adding a view (newby question)

2009-07-20 Thread Jason Cheung
Max Williams wrote: the 'new' path and the 'edit' path are the only ones that actually have the name of the action in them. The rest are determined based on whether you refer to the singular or plural version of the resource (eg comments vs comment) and the type of the request. I found

[Rails] Easiest User autentification

2009-07-20 Thread Sergio Angeletti - Gmail
If you have some pages to be password managed and the site is ready do you hace know a plugin for thath. Sergio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: Adding a view (newby question)

2009-07-20 Thread Max Williams
Jason Cheung wrote: Max Williams wrote: the 'new' path and the 'edit' path are the only ones that actually have the name of the action in them. The rest are determined based on whether you refer to the singular or plural version of the resource (eg comments vs comment) and the type of

[Rails] Re: Easiest User autentification

2009-07-20 Thread spokra
I like these to plugins authlogic and declarative_authorization. check them out on github.com On Jul 19, 10:53 pm, Sergio Angeletti - Gmail sergio.angele...@gmail.com wrote: If you have some pages to be password managed and the site is ready do you hace know a plugin for thath. Sergio

[Rails] Re: Equipment_URL Failed to Generate (new_equipment_path)

2009-07-20 Thread Rick
The error message is spot on (except that is says you may...) as you have problems with your routes. Try running script/generate scaffold Machine name:string and the follow-on rake db:migrate and rake routes. Look at the difference between the routes generated for Equipment/Equipment and

[Rails] Re: How to Disable Pluralization

2009-07-20 Thread Rick
Before you do anything extreme, try this (example from previous post). script/generate scaffold Equipment name:string kind:string Then see what happens when you go: http://localhost:3000/equipment/new Equipment is a word that behaves just as you'ld like with singular (equipment) ==

[Rails] Print disabling dialog box

2009-07-20 Thread Abhishek shukla
Hello, I need a functionality where i can print out the content on just one click with out dialog box alert. So is it possible with ruby on rails? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Strange Passenger behavior on OS X

2009-07-20 Thread Rick DeNatale
I've just spent several days intermittently trying to get a development rails app working again under passenger on OS X. I still don't understand what happened. This app was working fine until a few days ago. All of a sudden it would fail to initialize. The backtrace in the apache error log

[Rails] flickr-fu group search

2009-07-20 Thread Patrick Heneise
Hi guys, I'm trying to retrieve photos of a group pool with flickr-fu gem. This is my search term: flickr.photos.search(:group_id = '1120...@n25'). It only retrieves three out of currently 16 photos. Those three are creative commons, the other ones are copyrighted, but can be viewed by anybody.

[Rails] Re: How to Disable Pluralization

2009-07-20 Thread Rick DeNatale
On Sat, Jul 18, 2009 at 3:24 AM, harunharun...@gmail.com wrote: Hi, First, I am new at Ruby on Rails. When using scaffolding feature, rails pluralize some automatically generated files' names, like controller names, view names and helper names. What I want is to disable this pluralization.

[Rails] Re: rake error

2009-07-20 Thread jko170
Anyone have this problem before? On Jul 20, 4:04 am, jko170 jko...@gmail.com wrote: Here it is: 292 tests, 350 assertions, 2 failures, 13 errors rake aborted! Command failed with status (1): [/usr/local/bin/ruby -Ilib:test / usr/loc...]

[Rails] Is flickr plugin that slow in rails?

2009-07-20 Thread Victor Martin
Hi there, I'm creating a little web app that do, among other stuff, a bit of flickr search. The code is like this: VIEW % form_remote_tag :url = {:action = 'search'}, :update = 'photos', :complete = visual_effect(:blind_down, 'photos'), :before = %(Element.show('spinner')),

[Rails] help

2009-07-20 Thread marce...@gmail.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 To unsubscribe from this group, send email to

[Rails] Re: help

2009-07-20 Thread Developer In London
a bit more info would be useful. 2009/7/20 marce...@gmail.com marce...@gmail.com -- cashflowclublondon.co.uk (`-''-/).___..--''`-._ `6_ 6 ) `-. ( ).`-.__.`) (_Y_.)' ._ ) `._ `. ``-..-'

[Rails] form_for syntax?

2009-07-20 Thread elliottg
I have been using this namespaced form_for syntax with no problems: % form_for [:admin, @products] do |f| % However, now that I am working with a model and controller called news which has no differentiation between singular and plural... % form_for [:admin, @news] do |f| % ... I am

[Rails] Re: form_for syntax?

2009-07-20 Thread s.ross
You might consider adding an inflection for news in your config/ initializers/inflections.rb. That will tell Rails that the plural of news is news. There are examples in the Rails-generated file. On Jul 20, 2009, at 12:00 PM, elliottg wrote: I have been using this namespaced form_for

[Rails] Re: form_for syntax?

2009-07-20 Thread David A. Black
Hi -- On Mon, 20 Jul 2009, elliottg wrote: I have been using this namespaced form_for syntax with no problems: % form_for [:admin, @products] do |f| % However, now that I am working with a model and controller called news which has no differentiation between singular and plural... %

[Rails] Re: form_for syntax?

2009-07-20 Thread David A. Black
Hi -- On Mon, 20 Jul 2009, s.ross wrote: You might consider adding an inflection for news in your config/ initializers/inflections.rb. That will tell Rails that the plural of news is news. There are examples in the Rails-generated file. It's already there. I don't think this is actually a

[Rails] Re: Print disabling dialog box

2009-07-20 Thread bill walton
On Mon, 2009-07-20 at 22:46 +0530, Abhishek shukla wrote: Hello, I need a functionality where i can print out the content on just one click with out dialog box alert. So is it possible with ruby on rails? This is a function of the browser, not of Rails. In Firefox there's a setting in

[Rails] Re: form_for syntax?

2009-07-20 Thread elliottg
Thanks for the input guys. The adminl is a email typo only... Here's a truncated version of my route config. map.namespace :admin do | admin | admin.resources :news, :collection = {:sort = :post} end My tests confirm that news_controller.rb#new is indeed sending out a new @news object.

[Rails] getting mysql gem to work with WAMP's MySQL

2009-07-20 Thread Mike C
I use WAMP and I don't really want to install another MySQL just to work with Rails. How can I make the mysql gem use WAMP's MySQL? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] Re: form_for syntax?

2009-07-20 Thread elliottg
I figured it out. It was directly related to the form_for syntax. I guess that when rails generates the alternative explicit index route. In this case admin_news_index vs admin_news a more explicit syntax is needed. Instead of this: % form_for [:admin, @news] do |f| % I found this solved my

[Rails] Re: rake error

2009-07-20 Thread James Byrne
jko170 wrote: When I run rake test:units I get this error: 292 tests, 350 assertions, 2 failures, 13 errors rake aborted! Command failed with status (1): [/usr/local/bin/ruby -Ilib:test / usr/loc...] This error just showed up yesterday --- I have no idea how I caused it. Here is my gem

[Rails] Re: Strange Passenger behavior on OS X

2009-07-20 Thread John Barnette
Hi Rick, On Mon, Jul 20, 2009 at 10:22 AM, Rick DeNatalerick.denat...@gmail.com wrote: I've just spent several days intermittently trying to get a development rails app working again under passenger on OS X. After much head-scratching I finally noticed that passenger (which had been started

[Rails] Re: rake error

2009-07-20 Thread jko170
Nothing is outputted. It just loads forever. On Jul 20, 4:10 pm, James Byrne rails-mailing-l...@andreas-s.net wrote: jko170 wrote: When I run rake test:units I get this error: 292 tests, 350 assertions, 2 failures, 13 errors rake aborted! Command failed with status (1):

[Rails] noob syntax question

2009-07-20 Thread internetchris
Hey everyone, I'm just solidifying my understanding of ruby example by example. Can someone let me know if I understand this correctly... In my view I have the following... %= render :partial = sidebar , :locals = { :recent_messages = @recent_messages } % Am I correct when I say that I'm

[Rails] Associations problem

2009-07-20 Thread Robin Fisher
Hi all, I have some associations setup such that: class Job has_many :applications end class Candidate has_many :applications end class Application belongs_to :job belongs_to :candidate end When viewing a particular job, I have the following iteration: % for application in

[Rails] Re: noob syntax question

2009-07-20 Thread David A. Black
Hi -- On Mon, 20 Jul 2009, internetchris wrote: Hey everyone, I'm just solidifying my understanding of ruby example by example. Can someone let me know if I understand this correctly... In my view I have the following... %= render :partial = sidebar , :locals = { :recent_messages =

[Rails] Re: make setter private

2009-07-20 Thread Learn By Doing
Hi David, The reason I need to redefine the assignment and make it private is that because whenever x is assigned a new value, some other processes must take place: def set_x(val) self.x = val # some other processes take place here end private def x=(val) super end I don't

[Rails] Re: Paymo {mobile payment integration with} ?

2009-07-20 Thread Emanuele Tozzato
Hey Ciao! I'm back to writing the implementation of PayMo as a active merchant integration.. Do you have any code I can use? maybe we can trade - I'm finishing the ClickBuy integration right now ;) Thanks, E. On Wed, Jul 1, 2009 at 7:01 PM, Älphä Blüërails-mailing-l...@andreas-s.net wrote:

[Rails] Re: Strange Passenger behavior on OS X

2009-07-20 Thread Rick DeNatale
On Mon, Jul 20, 2009 at 5:25 PM, John Barnettejbarne...@gmail.com wrote: Hi Rick, On Mon, Jul 20, 2009 at 10:22 AM, Rick DeNatalerick.denat...@gmail.com wrote: I've just spent several days intermittently trying to get a development rails app working again under passenger on OS X. After

[Rails] Re: Strange Passenger behavior on OS X

2009-07-20 Thread Rick DeNatale
On Mon, Jul 20, 2009 at 6:22 PM, Rick DeNatalerick.denat...@gmail.com wrote: Well, as I implied, I think it was and is /opt/local/bin/ruby And just to be perfectly clear that was supposed to be as I implied, I think,... the missing comma changes the sense of the sentence. It definitely WAS

[Rails] Re: noob syntax question

2009-07-20 Thread internetchris
Many thanks! I did have it backwards. I felt uncomfortable describing it to myself so I thought I better ask. Chris On Jul 20, 4:08 pm, David A. Black dbl...@rubypal.com wrote: Hi -- On Mon, 20 Jul 2009, internetchris wrote: Hey everyone, I'm just solidifying my understanding of

[Rails] Ruby 1.9.1 One-Click Installer for Windows

2009-07-20 Thread Rohit Chauhan
- Latest Ruby 1.9.1 One-Click Installer with No-Hassle Rails Installation - Filename : Ruby 1.9.1

[Rails] how to use view_paths() and why you need to use.

2009-07-20 Thread pal
how to use view_paths() and why you need to use. What is the purpose. can you explain and give some sample code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: Rails and Qooxdoo

2009-07-20 Thread fabian.jak...@googlemail.com
Hi Glex, I personally don't have used qooxdoo with RoR but the qooxdoo mailing list would be a good place to ask such a question http://qooxdoo.org/ community/mailing_lists. Usually qooxdoo applications plain XMLHTTPRequest or JSON-RPC to communicate with the server. Both solutions should work

[Rails] Polymorphic Comment notification to Users?

2009-07-20 Thread millisami
Hi, my webapp has registered users and it has articles, blog posts, gossips too. For all these resources I've a polymorphic Comment model which is listed below. pre id content commentable_id commentable_type user_id created_at updated_at 1 Frist comment 2

[Rails] Re: make setter private

2009-07-20 Thread Frederick Cheung
On Jul 20, 11:20 pm, Learn By Doing ease...@gmail.com wrote: Hi David, The reason I need to redefine the assignment and make it private is that because whenever x is assigned a new value, some other processes must take place: Why not override x= then rather than inventing a new set_x

[Rails] pagination

2009-07-20 Thread tanya
Hi, I am new to rails and developing a networking site.I am finding difficulty with pagination since i am working on rails 2.0.0. can somebody help me with the definition of paginate function. Thanx --~--~-~--~~~---~--~~ You received this message because you are

[Rails] hello

2009-07-20 Thread eric
Hello everyone this is my first post. I come from a .NET background but I have seen first hand the elegance of ruby and now i'm hooked. I'm learning rails on 2.3.x and have worked through setting up a db connection and building scaffolding, i'm excited and needed a place to land once and a while

[Rails] Project Code Decision

2009-07-20 Thread Eric
Hello Everyone, My name is Eric. I will be starting a large project soon and I have a few questions. I will be creating a browser based sports simulator. Users will be able to create a player or a coach and ether coach a team or play on a team. We plan to have features like a live game

[Rails] Date format issue: Empty (NULL) date is getting save in mysql DB

2009-07-20 Thread gmal
I am having issue while saving date (effective_at) to mysql databse usning format MM-DD-YY. The date is getting saved as null but while using format '-MM-DD' its working perfectly. Please see below. Processing UsersController#update (for 127.0.0.1 at 2009-07-20 10:35:24) [PUT] Session ID:

[Rails] Hitting unknown error with can't dup NilClass

2009-07-20 Thread tonymocha
Hi, My system has been encounter this problem, and I couldn't find solution after debugging. My scenario is stated below: class user has_many :posts has_many :comments end class post belongs_to :user has_many :comments, :as = :commentable end class comment belongs_to :post

[Rails] AJAX render :partial does not update if specified view matches current view

2009-07-20 Thread Thomas Allen
I have some simple code that renders a form to an element specified in form_remote_tag :update. The problem is that, if the loaded view matches the view to render, Rails does nothing rather than refreshing the view (which is the desired behavior). There is an element with id form, also specified

[Rails] 2.3.3 update broke my test suite

2009-07-20 Thread mpd
hello, The recent update to 2.3.3 is breaking my entire suite with the same error. I guess something in the load order changed? e.g.: Fixture::FormatError in 'PublishedGallery Methods#thumbnail should delegate to its lead asset' a YAML error occurred parsing /Users/mpd/timber/spec/fixtures/

[Rails] Re: make setter private

2009-07-20 Thread David A. Black
Hi -- On Mon, 20 Jul 2009, Learn By Doing wrote: On Jul 19, 8:03 pm, David A. Black dbl...@rubypal.com wrote: Hi -- On Sun, 19 Jul 2009, Learn By Doing wrote: On Jul 19, 6:39 pm, David A. Black dbl...@rubypal.com wrote: Hi -- On Sun, 19 Jul 2009, Ease Bus wrote: Hi, I would like to

[Rails] Re: getting mysql gem to work with WAMP's MySQL

2009-07-20 Thread Frederick Cheung
On Jul 20, 9:32 pm, Mike C snib...@gmail.com wrote: I use WAMP and I don't really want to install another MySQL just to work with Rails. How can I make the mysql gem use WAMP's MySQL? as long as your app's database.yml has the the port, ip address etc... of the instance of mysql you want it

[Rails] Re: rake error

2009-07-20 Thread James Byrne
jko170 wrote: Nothing is outputted. It just loads forever. What exactly do you mean by, It just loads forever. Status 1 from a ba shell means that the returning processed failed for some reason. If your ruby binary has had its permissions changed, or it has been moved, or corrupted in some

[Rails] Re: make setter private

2009-07-20 Thread David A. Black
Hi -- On Mon, 20 Jul 2009, Frederick Cheung wrote: On Jul 20, 11:20 pm, Learn By Doing ease...@gmail.com wrote: Hi David, The reason I need to redefine the assignment and make it private is that because whenever x is assigned a new value, some other processes must take place: Why not

[Rails] Re: Associations problem

2009-07-20 Thread Josh
I don't know if application is reserved, I would guess it is not since models don't use this term, but try what I have below before renaming things. In my experience you need to check the candidate is not nil. Especially since you aren't requiring an application has a candidate. % for

[Rails] Re: hello

2009-07-20 Thread bill walton
On Mon, 2009-07-20 at 05:52 -0700, eric wrote: Hello everyone this is my first post. I come from a .NET background but I have seen first hand the elegance of ruby and now i'm hooked. I'm learning rails on 2.3.x and have worked through setting up a db connection and building scaffolding, i'm

[Rails] Re: rake error

2009-07-20 Thread jko170
I enter the command and press enter and nothing happens. On Jul 20, 5:56 pm, James Byrne rails-mailing-l...@andreas-s.net wrote: jko170 wrote: Nothing is outputted. It just loads forever. What exactly do you mean by, It just loads forever.  Status 1 from a ba shell means that the returning

[Rails] Warning: Gem::SourceIndex#search

2009-07-20 Thread Renzo
C:\Ruby\SITES\firstprojectcd.. C:\Ruby\SITEScd myapp C:\Ruby\SITES\myappruby script/server ./script/../config/boot.rb:25:Warning: Gem::SourceIndex#search support for Strin g patterns is deprecated, use #find_name ./script/../config/boot.rb:28: undefined method `require_gem' for main:Object (N

[Rails] Re: rake error

2009-07-20 Thread James Byrne
jko170 wrote: I enter the command and press enter and nothing happens. On Jul 20, 5:56�pm, James Byrne rails-mailing-l...@andreas-s.net Then the ruby vm is not starting properly, and as Rake is a ruby script it fails in consequence. Resolve what has happened with your ruby installation

[Rails] Re: Project Code Decision

2009-07-20 Thread bill walton
Hi Eric On Mon, 2009-07-20 at 08:28 -0700, Eric wrote: I know I will be developing the site itself with rails. Super. However I am not sure how well rails will work for the actual simulation. My question is do you all think that rails would be a good tool for creating the sim or

[Rails] Re: rake error

2009-07-20 Thread Avdi Grimm
On Jul 20, 7:19 pm, James Byrne rails-mailing-l...@andreas-s.net wrote: Then the ruby vm is not starting properly, and as Rake is a ruby script it fails in consequence.  Resolve what has happened with your ruby installation and the Rake problem is likely resolved as well. Entering

[Rails] Re: 2.3.3 update broke my test suite

2009-07-20 Thread mpd
Captured a backtrace for this: /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/ fixtures.rb:745:in `parse_yaml_string' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/ fixtures.rb:697:in `read_yaml_fixture_files'

[Rails] Re: getting mysql gem to work with WAMP's MySQL

2009-07-20 Thread Mike C
Thanks. It's just that when I tried to require 'mysql' in the irb, it gave me an error telling me the libmysql.dll or something couldn't be found and that I'd need to reinstall/repair mysql. On Jul 20, 3:41 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Jul 20, 9:32 pm, Mike C

[Rails] Re: nil object in create_time_zone_conversion_attribute?

2009-07-20 Thread Evan Light
Michael Madrid wrote: I just upgraded to 2.3.2 on Windows 7 and am getting the error. Using file system gives a different error Unable to create directory, and memcached won't install. Not sure what to do. I've seen this problem in 2.3.2 and now in 2.3.3. The above mentioned solution

[Rails] Re: Project Code Decision

2009-07-20 Thread Eric
Thanks Bill. On Jul 20, 6:23 pm, bill walton bwalton...@gmail.com wrote: Hi Eric On Mon, 2009-07-20 at 08:28 -0700, Eric wrote: I know I will be developing the site itself with rails.   Super. However I am not sure how well rails will work for the actual simulation.  My question is

[Rails] AJAX/Javascript Question

2009-07-20 Thread Jeffrey L. Taylor
What is the difference between these two: render :js = window.open('#{url}') and render :update do |page| page window.open('#{url}') end TIA, Jeffrey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby

  1   2   >