[Rails] Re: Still undefined pagination

2008-11-05 Thread Freddy Andersen
environment.rb: config.gem 'mislav-will_paginate', :version => '~> 2.3.2', :lib => 'will_paginate', :source => 'http://gems.github.com' rake gems:install Now in the controller: @books = Book.paginate(:page => params[:books]) And here is the view: <%= will_paginate @books %> Its al

[Rails] Re: ruby-openid is breaking my rake

2008-11-05 Thread Pod Caster
Hi, any ideas anyone why a gem wouldn't be found even if I can use it? And it would break the rake command? I guess it is some configuration but I can't get it to work. Cheers. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this mes

[Rails] Re: Active Merchant Example

2008-11-05 Thread Freddy Andersen
You can look at this code http://code.google.com/p/substruct/ --~--~-~--~~~---~--~~ 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 uns

[Rails] Re: define relative url

2008-11-05 Thread Luca Scaljery
thnx for your reply! Here is the part of the apache config dealing with my mongrel cluster: RewriteRule ^/backend/(.*)$ balancer://mongrel_cluster/$1 [P,QSA,L] RewriteRule ^/rails/(.*)$/test/current/public/$1[PT] I think its only the first line I'm using! Furthermore I've plans to

[Rails] Re: Weird characters

2008-11-05 Thread Remco Swoany
TomRossi7 wrote: > Do you have your charset set to utf-8 in the head of your html? Are > the values coming from a database? > > --Tom > > On Nov 5, 3:46�pm, Remco Swoany <[EMAIL PROTECTED]> Tom, The values coming from my database (mysql). My header is: remco -- Posted via http://www.ruby

[Rails] Re: AJAX - REST & nested resources

2008-11-05 Thread John Small
AndyV wrote: > There's really no magic here. The default response to an update in > the scaffolded controller is to redirect to the show event. If you > want to do something different (ie., the convention doesn't work for > you) then go to the scaffolded controller and change it. I'd guess > yo

[Rails] text wrap

2008-11-05 Thread Ishara Gunathilake
i hav a this code <%h f.body%> which shows some texts which are retrieved from a table..i want to wrap the texts,,i cant add div tag to between that code. please can anyone help me to solve this --~--~-~--~~~---~--~~ You received this message because you are subscri

[Rails] Re: difficulty in understanding the valgrind output for ror

2008-11-05 Thread Santosh Turamari
Hi, I am trying with bleak_house... it gives the dump... but in dump analyze I am getting the following output...I am not able to track this output also..pls help me out. bleak /tmp/bleak.6524.0.dump Displaying top 20 most common line/class pairs 456423 total objects 456423 filled heap slots 29

[Rails] active record associations

2008-11-05 Thread Franz
I want to accomplish the following. I have an object that can be edited. However, it can occur that two people might edit the object at the same time. Instead of locking the object down, I prefer to tell the user how their version differs from the last version that was committed. Kinda like: r

[Rails] How to handle change events of HTML controls using Rails Fra

2008-11-05 Thread Narasimha prasad Daruru
Hi, 1. I require to populate dropdowns and textboxes based on the selection in one or the other dropdowns. I tried to create a dropdown ,radiobutton,checkbox. But I am not able to find the event handlers for the controls mentioned. (Like Onchange Event for dropdown list in .NET) . It wi

[Rails] Active Merchant Example

2008-11-05 Thread sshefer
Hi, I've searched the web and found some old examples of Active Merchant but was wondering if anyone had, or could point me to, a definitive guide showing a simple checkout where the logic is in the model rather than including the process in the controller. I'd like to keep everything separate a

[Rails] Implementation guidance, please

2008-11-05 Thread RichardOnRails
Hi, I just want some validation or correct to my implementation plan for a modest, Rails-based Payroll system. 1. The input is going to be a set of weekly spreadsheets (in CVS form) which the user will copy from time to time into, say, a manually created repository Payroll\public\data. OK? 2.

[Rails] Re: difficulty in understanding the valgrind output for ror

2008-11-05 Thread Santosh Turamari
Thank You for information.I ll try with bleak_house. I recommend using Bleak House instead to track down Ruby and Rails memory leaks: http://blog.evanweaver.com/files/doc/fauna/bleak_house/files/README.html -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~-

[Rails] Still undefined pagination

2008-11-05 Thread Hammer Ting
I have tried to install both the classic_pagination and will_paginate using the commands below, but still get the "undefined method paginate". Source code and error dump shown below. What did i miss out. Thanks. === Commands to install plugins == ruby script/plugin install

[Rails] Re: SQL queries in Rails

2008-11-05 Thread Phillip Koebbe
The Neurochild wrote: > > Do I have to create the initializers directory? Because Rails didn't > created it. > Initializers come with Rails 2.x (not sure if which point release, maybe the first one). You'll have to use the environment.rb method in 1.2.x. > I tested the config for PostgreSQL a

[Rails] Re: SQL queries in Rails

2008-11-05 Thread Phillip Koebbe
Gabriel Laskar wrote: > In order to have this with initializers, it is more simple, > you just drop the file in the config/initializers/ directory, and it > will be required by default > at boot of the rails application. > > The initializers have been realized in order to avoid all the stuff in >

[Rails] Global Translator Plugin?

2008-11-05 Thread John Honovich
Hello, I am looking for a simple way to automate translating my site into different languages. I believe that the most appropriate way for Ruby on Rails is to use Globalize. I have just started looking through the docs and want to verify that this is the best way to accomplish such translation.

[Rails] Re: Which Railshoster for a productive application in US?

2008-11-05 Thread dasil003
EngineYard. However if you can't afford that, RailsMachine is going to be the next best but the support is nowhere near the same level. On Nov 5, 4:49 pm, Knut Linke <[EMAIL PROTECTED]> wrote: > Dear Receiver and Forummembers ;), > I'm looking for a hoster in the US which provides the best envir

[Rails] Which Railshoster for a productive application in US?

2008-11-05 Thread Knut Linke
Dear Receiver and Forummembers ;), I'm looking for a hoster in the US which provides the best enviroment for a Ruby on Rails application. This should include Managed Server Support by the Linux Administration (I have no experiences with Linux so far), Backup and monitoring. The load on the server

[Rails] Force ERB templates to prevent making changes to models?

2008-11-05 Thread Jesse Proudman
I want to build a system where I can let users write templates that allow read access to Rails objects within and then send these templates out to customers via email. The problem I'm having is that through my tests, it's become obvious that this can create a security risk. Example: A customer c

[Rails] Re: How can I deploy gems in vendor/gems across multiple OS's

2008-11-05 Thread Norm
Cs Webgrl wrote: > Hi. > > Does anyone know about how to deal with deploying applications across > multiple OS's and how to deal with gems that are saved in vendor/gems? > I asked an earlier questions about how to make sure that gems are > available wherever the applications are deployed, but now

[Rails] rdiscount on windows

2008-11-05 Thread John Butler
Hi, I wonder if anyone can help. Im trying to get an application running on windows which requires the rdiscount gem. I found the following link below which looks like its a no go on windows(sorry link is so long, the page was cached), http://66.102.9.104/search?q=cache:uH2rJxIMclQJ:tomayko.co

[Rails] Re: Removed edge rails but cannot find installed rails

2008-11-05 Thread James Byrne
James Byrne wrote: > I removed edge-rails from a project, git rm, committed and pushed the > revised project to the shared repository, and then git pulled it onto my > Windows XPpro laptop. ... > > This shows that despite removing vendor/rails my laptop installation is > still trying to load from

[Rails] Re: RMagick Windows Ruby 1.8.7. Do I need to compile?

2008-11-05 Thread Chris Dekker
Solved it already... Turned out I actually needed the specific version of ImageMagick (I was still running an older version) and it had nothing to do with Ruby 1.8.7 :( -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message be

[Rails] Removed edge rails but cannot find installed rails

2008-11-05 Thread James Byrne
I removed edge-rails from a project, git rm, committed and pushed the revised project to the shared repository, and then git pulled it onto my Windows XPpro laptop. Both the original host and my laptop have Rails-2.2.0RC1 installed. The Gem environment is: $ rails --version Rails 2.2.0 $ gem e

[Rails] Re: define relative url

2008-11-05 Thread TomRossi7
Luca, I run my Rails apps behind an Apache server and don't have that issue. It seems like your best bet would be to work on your Apache config and not your Rails config (assuming you have control over the server). You should be able to point the Apache server right to the root of your app. Po

[Rails] Re: Weird characters

2008-11-05 Thread TomRossi7
Do you have your charset set to utf-8 in the head of your html? Are the values coming from a database? --Tom On Nov 5, 3:46 pm, Remco Swoany <[EMAIL PROTECTED]> wrote: > Hi, > > I have weird characters in my view, like: > > Armeni > Jordani > Isra l > ect. > > How can i solve this problem? > >

[Rails] HABTM << Behavior

2008-11-05 Thread TomRossi7
Lets say you have a relationship like post has and belongs to many categories. If I were to do something like the following: category << post category << post category << post I've basically assigned the post to the category three times. I'm noticing that in my join table there are now three j

[Rails] Re: Ensuring all HTML tags close in text fields

2008-11-05 Thread Gregory Seidman
On Wed, Nov 05, 2008 at 10:38:05PM +0100, Luke Grimstrup wrote: > Does anyone know of a way/method/plugin for ensuring HTML tags all close > and/or close them automatically when the data is pulled or pushed into > the database??? Look into Hpricot. Doing Hpricot(htmltext).to_html will give you we

[Rails] ruby-openid is breaking my rake

2008-11-05 Thread comopasta Gr
Hi, I'm having a weird problem: [~/rails/hip]# rake routes (in /home/mydomain/rails/hip) Missing these required gems: ruby-openid >= 2.0.4 You're running: ruby 1.8.6.287 at /usr/bin/ruby rubygems 1.3.1 at /home/mydomain/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8 Run `rake gems:install` to in

[Rails] Re: removing row from a table using link_to_remote..

2008-11-05 Thread Philip Hallstrom
>> i have a table of values that are presented in a regular html table. >> >> what i would like to do is: >> >> when DELETE is selected in a row, use link_to_remote to do some >> processing on the selected record.. >> >> once this data is is processed, and the controller is done, i would >> like >

[Rails] Re: Cant serve video via rails

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 17:38, Oliver Fox wrote: > > Hi all, > I have an m4v file which I'm trying to view on my iPhone via a rails > app. > If i place the file in my apache root or in /public and hit the url, > it > plays back fine, but no matter what I try with rails, the iPhone will > try to down

[Rails] Re: Securing Models From a Controller versus ActsAsRowSecured

2008-11-05 Thread Jeff Shrager
I got some more on this from the engineer who developed the other approach. He writes: --- The proposed method supports multi-tenancy with the explicit requirement for role-based permissions for all data views. On the one hand, the intellectual property of an individual or organization must be gu

[Rails] Re: removing row from a table using link_to_remote..

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 21:28, Sergio Ruiz wrote: > > i have a table of values that are presented in a regular html table. > > what i would like to do is: > > when DELETE is selected in a row, use link_to_remote to do some > processing on the selected record.. > > once this data is is processed, and t

[Rails] Ensuring all HTML tags close in text fields

2008-11-05 Thread Luke Grimstrup
Does anyone know of a way/method/plugin for ensuring HTML tags all close and/or close them automatically when the data is pulled or pushed into the database??? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you ar

[Rails] Re: SQL queries in Rails

2008-11-05 Thread The Neurochild
On Nov 5, 3:57 pm, "Gabriel Laskar" <[EMAIL PROTECTED]> wrote: > In order to have this with initializers, it is more simple, > you just drop the file in the config/initializers/ directory, and it > will be required by default > at boot of the rails application. > > The initializers have been rea

[Rails] Re: Setting "From" in Mailer model

2008-11-05 Thread Luke Grimstrup
Excellent! Just what I was looking for! :D -- 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

[Rails] removing row from a table using link_to_remote..

2008-11-05 Thread Sergio Ruiz
i have a table of values that are presented in a regular html table. what i would like to do is: when DELETE is selected in a row, use link_to_remote to do some processing on the selected record.. once this data is is processed, and the controller is done, i would like to delete that entry usin

[Rails] Which is the best attachment plugin for my situation?

2008-11-05 Thread JL Smith
I'm trying to decide which attachment plugin best suites the needs for my project. I have a model that I want to associate one or many attachments to. The content-type of the attachment will vary as well (pdf, jpeg, doc, zip), not just an image type. Thanks for any help! --~--~-~--~

[Rails] Re: Muliply images > wich plugin?

2008-11-05 Thread Ar Chron
swfupload works well for uploading a ton of images at once as well. pick the folder, then select all the files you want to upload, then go. swfupload handles serially uploading each file in turn. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ Yo

[Rails] Re: m:n realtions don't work with fixtures?!

2008-11-05 Thread Heinz Strunk
Spelling error in the model.rb. All good, thanks a lot! -- 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 rub

[Rails] Warning: Ambiguous first argument; make sure.

2008-11-05 Thread Heinz Strunk
Hello, I'm getting this warning: Warning: Ambiguous first argument; make sure. in my unit test: assert_match /^[a-zA-Z0-9]+$/, user.username Does anyone know why or how to change it so it disappears? Thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~

[Rails] How can I deploy gems in vendor/gems across multiple OS's

2008-11-05 Thread Cs Webgrl
Hi. Does anyone know about how to deal with deploying applications across multiple OS's and how to deal with gems that are saved in vendor/gems? I asked an earlier questions about how to make sure that gems are available wherever the applications are deployed, but now I've run into various versio

[Rails] Re: AJAX - REST & nested resources

2008-11-05 Thread AndyV
There's really no magic here. The default response to an update in the scaffolded controller is to redirect to the show event. If you want to do something different (ie., the convention doesn't work for you) then go to the scaffolded controller and change it. I'd guess you want to redirect to t

[Rails] Weird characters

2008-11-05 Thread Remco Swoany
Hi, I have weird characters in my view, like: Armeni� Jordani� Isra�l ect. How can i solve this problem? Grtz..remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: select in form - best practice?

2008-11-05 Thread AndyV
Looks like a good place to give this a spin: http://railscasts.com/episodes/121-non-active-record-model Basically, use a pure-ruby class to wrap the location types and let it support an ActiveRecord like interface (mainly find and all). Then you can do collection_select the way you would with a

[Rails] Syntax to create a dependent relation?

2008-11-05 Thread James Byrne
In my controller I have this: def new load_entity @location = @entity.locations.build @site = @location.build_site respond_to do |format| format.html # new.html.erb format.xml { render :xml => @location } end end # GET /locations/1/edit def edit load

[Rails] Re: Are there plugins available for Hpricot or Mechanize

2008-11-05 Thread Cs Webgrl
As a follow-up to how to enable these gems to be packaged within the application... how does it work across multiple OS's? I have Windows environments and Linux environments. Is it possible to put these gems in vendor/gems and have them work across systems? -- Posted via http://www.ruby-foru

[Rails] Re: functional testing with filters

2008-11-05 Thread Ed
But of course. Thanks! On Nov 5, 2:43 pm, Frederick Cheung <[EMAIL PROTECTED]> wrote: > On Nov 5, 7:04 pm, Ed <[EMAIL PROTECTED]> wrote: > > > How do I do functional tests on controller methods protected by before > > filters, without using the soon-to-be-deprecated "follow_redirect"? > > > Say

[Rails] Re: select in form - best practice?

2008-11-05 Thread James Byrne
Frederick Cheung wrote: > On Nov 5, 7:31�pm, James Byrne <[EMAIL PROTECTED]> > wrote: >> � � default_location_type = 'MAIN' >> > Personally I would have it as a constant of the Location class, ie > > class Location ... > VALID_TYPES = [...] > end > > Fred Point taken. Nonetheless, in the int

[Rails] Re: select in form - best practice?

2008-11-05 Thread Frederick Cheung
On Nov 5, 7:31 pm, James Byrne <[EMAIL PROTECTED]> wrote: > Should this instead be constructed so that the model, Locations, has > these virtual attributes: > >     valid_location_type[]= >       [ >         ['MAIN - Main Location','MAIN'], >         ['POST - Postal Delivery', 'POST'], >       ...

[Rails] Re: functional testing with filters

2008-11-05 Thread Frederick Cheung
On Nov 5, 7:04 pm, Ed <[EMAIL PROTECTED]> wrote: > How do I do functional tests on controller methods protected by before > filters, without using the soon-to-be-deprecated "follow_redirect"? > > Say I have a method called index, filtered by check_login.  If the > user is not logged in, they get

[Rails] Review: Ruby on Rails 2.2 EnvyCast

2008-11-05 Thread Kenneth Kalmer
Hi everyone For those considering purchasing the Ruby on Rails 2.2 EnvyCast, I've published a review on my blog at http://www.opensourcery.co.za/2008/11/05/review-ruby-on-rails-22-envycast/ DISCLAIMER: I'm in no way affiliated with EnvyCast.com and earn no commission on the referrals to their si

[Rails] Re: Warning messages on gem:unpack after updating to rubygems 1.3

2008-11-05 Thread scottmotte
+ 2 On Oct 29, 10:32 am, mattwynne <[EMAIL PROTECTED]> wrote: > +1 > > On Oct 2, 9:37 pm, Mike Breen <[EMAIL PROTECTED]> wrote: > > > After updating to rubygems 1.3 I started getting these warnings when > > running "rake gems:update" : > > > WARNING:  Installing to ~/.gem since /Library/Ruby/Gems

[Rails] select in form - best practice?

2008-11-05 Thread James Byrne
Q. What resource do readers recommend for referencing regarding best practices for form construction in Rails? I have the following situation: location_type of Locations may have one of five (5) possible codes. Presently I have these codes listed in a drop-down select constructed thusly:

[Rails] Re: Using Inner/Outer join to eager fetch belongs_to associations

2008-11-05 Thread Pardee, Roy
Fetch, for sure--I'm just unsure whether AR will use the extra data to actually populate the child objects. If only I wasn't so lazy, I'd consult the docs and/or try it out. ;-) Definitely take your point about taking advantage of the ORM. But it seems to me that some people get fetishistic

[Rails] Re: ActionMailer cancel send from one of deliver_* methods

2008-11-05 Thread Henrik ---
surge wrote: > Seems like executing a return in one of the deliver_* methods of > ActionMailer doesn't cancel the delivery. The template is still read > right after the return method has been executed and because all > variables in the template are empty, all kinds of errors occur. > > I need to

[Rails] functional testing with filters

2008-11-05 Thread Ed
How do I do functional tests on controller methods protected by before filters, without using the soon-to-be-deprecated "follow_redirect"? Say I have a method called index, filtered by check_login. If the user is not logged in, they get redirected to the login method, which logs them in and dire

[Rails] New application has been launched with rails

2008-11-05 Thread sadeesh kumar
Hi friends check http://www.hamaramatrimony.com , a new matrimonial portal completely based on astrological marriage matchings is launched. Hit now and feedback here. Thanks, Sadeesh Kumar Viswanathan. --~--~-~--~~~---~--~~ You received this message because you ar

[Rails] Re: m:n realtions don't work with fixtures?!

2008-11-05 Thread Heinz Strunk
rails -v Rails 2.1.0 -- 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 u

[Rails] Re: auto-complete without connecting to the server

2008-11-05 Thread Sam Kong
Robert Zotter wrote: > Take a look at the local autocompleter wiki, it has all the > information you will need. > http://github.com/madrobby/scriptaculous/wikis/autocompleter-local Thank you very much. This is exactly what I was looking for. Sam -- Posted via http://www.ruby-forum.com/. --~-

[Rails] Cant serve video via rails

2008-11-05 Thread Oliver Fox
Hi all, I have an m4v file which I'm trying to view on my iPhone via a rails app. If i place the file in my apache root or in /public and hit the url, it plays back fine, but no matter what I try with rails, the iPhone will try to download the file and receive an error. I have set up an apache->m

[Rails] Re: auto-complete without connecting to the server

2008-11-05 Thread Robert Zotter
Typo ...maybe there is one someone --> ...maybe there is one somewhere. On Nov 5, 9:24 am, Robert Zotter <[EMAIL PROTECTED]> wrote: > Sam, > I am unaware of any plugins for this, maybe there is one someone. > Fortunately though It is trivial to implement with the Scriptaculous > library. > > Bas

[Rails] Re: auto-complete without connecting to the server

2008-11-05 Thread Robert Zotter
Sam, I am unaware of any plugins for this, maybe there is one someone. Fortunately though It is trivial to implement with the Scriptaculous library. Basically the syntax is new Autocompleter.Local(id_of_text_field, id_of_div_to_populate, array_of_strings, options); Take a look at the local autoc

[Rails] Re: Really confusing issue involving ActiveRecord and a NoMethodError

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 16:43, cdubd wrote: > > The first line, where I create a new Playlist object works, but the > other two do not. I can post the entire code listing in the upload > controller if you think it would help. > Yes. Fred > -Casen > > > > --~--~-~--~~~---

[Rails] Re: m:n realtions don't work with fixtures?!

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 16:17, Heinz Strunk wrote: > > Well, doesn't seem to work: just as a sanity check, what version of rails are you using ? Fred > > > rake aborted! > Mysql::Error: #42S22Unknown column 'groups' in 'field list': INSERT > INTO > `users` (`name`, `groups`) VALUES ('test', 'one')

[Rails] Re: Rails 2.1.2, complex find involving complex include, bug?

2008-11-05 Thread Jonathan Rochkind
Hmm, again answering my own question as soon as I ask it (writing this stuff out is sure helpful for clarifying your thoughts), poking around in the AR documentation leads me to another workaround. Specify the classname explicitly in the model relationships, even though it really shouldn't be

[Rails] auto-complete without connecting to the server

2008-11-05 Thread Sam Kong
Hi, My client wants to type instead of select from a list. But it's not just a free typing but typing the first few letters. So basically, it's auto-complete function except that the list data is already in the client as an array in JavaScript. Is there any plugin for such a function? If not, ho

[Rails] Rails 2.1.2, complex find involving complex include, bug?

2008-11-05 Thread Jonathan Rochkind
So I'm upgrading my app from Rails 1.2.6 to Rails 2.1.2. I have a complex find statement that worked in 1.2.6 and isn't working in 2.1.2. I think maybe this is a bug, although maybe there's something else I could be doing to work-around it? My find statement involves: * Models in a module for na

[Rails] Re: Really confusing issue involving ActiveRecord and a NoMethodError

2008-11-05 Thread cdubd
> What is in your upload controller ? > > > The issue I have is that the Artist class and the Song class seem to > > be undefined, even though they absolutely are defined. > > Actually it looks more like they have been defined a second time > > Fred > I can interact The following lines appear i

[Rails] Re: To Use or not to use global variable

2008-11-05 Thread Philip Hallstrom
On Nov 5, 2008, at 2:39 AM, Sijo Kg wrote: > > Hi > My application has facility that any user can create a ticket from > the intranet site.So upon creating a ticket he gives an email > id .And I > have to send mail back to this mail id giving created ticket's > information..My application is

[Rails] Re: Moving Back From ActiveRecord Session Store to cookie

2008-11-05 Thread Fernando Perez
You have to: 1) in application.rb, comment :secret => ..., so you just leave "protect_from_forgery" uncommented 2) in config/environment.rb, uncomment (or put back) config.action_controller.session = { ... } And you're all set. -- Posted via http://www.ruby-forum.com/. --~--~-~--~---

[Rails] 0 errors prohibited this model from being saved

2008-11-05 Thread tansaku
Hi, I just generated a scaffold for some existing models I have, and everything is working fine, except I get a 0 error message on the edit view: 0 errors prohibited this statistic type from being saved There were problems with the following fields: I would have thought the d

[Rails] Re: Muliply images > wich plugin?

2008-11-05 Thread Fernando Perez
Remco Swoany wrote: > Hi, > > > I have one destionation such as Barcelona and i want to store and show > multiply pictures of Barcelona. Wich upload plugin is the best for this > purpose? > > Grtz..remco paperclip or attachment_fu are your best candidates. -- Posted via http://www.ruby-forum.c

[Rails] Re: rake dependency error

2008-11-05 Thread Jonathan Rochkind
Hmm, actually, responding to my own question as soon as I posted it, uninstalling and then reinstalling the latest rake seems to have done it: "sudo gem uninstall rake -v 0.8.3" "sudo gem update rake". rake -v runs again, at least. Still wondering if there's any good way to 'downgrade' the R

[Rails] rake dependency error

2008-11-05 Thread Jonathan Rochkind
Rake no longer works for me at all. I think this is a result of having upgraded some gems (including the RubyGem system itself), but not others, some kind of dependency problem. (I actually didn't mean to upgrade this stuff, but typed stuff into the wrong terminal window. Doh! Don't think there's

[Rails] Re: m:n realtions don't work with fixtures?!

2008-11-05 Thread Heinz Strunk
Well, doesn't seem to work: rake aborted! Mysql::Error: #42S22Unknown column 'groups' in 'field list': INSERT INTO `users` (`name`, `groups`) VALUES ('test', 'one') Fixture of Users: one: name: test groups: one -- Posted via http://www.ruby-forum.com/. --~--~-~--~~

[Rails] AJAX - REST & nested resources

2008-11-05 Thread John Small
I've created a set of resources, with scaffolds that all work. I then changed one resource to be nested inside another as a one to many relation. This required a little bit of work on the tests, the controllers and the views but it all works. Now I want to go the extra step and have the child reso

[Rails] Re: m:n realtions don't work with fixtures?!

2008-11-05 Thread Heinz Strunk
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 To unsubscribe fr

[Rails] define relative url

2008-11-05 Thread Luca Scaljery
Hi All Because my app is running behind Apache my RoR helpers generate an incorrect url For example: http://my.website.com/xyz/users becames: http://my.webiste.com/users So I tried to set the relative path to 'xyz' like ActionController::AbstractRequest.relative_url_root = '/xyz' $> ./sc

[Rails] Problem with Rails 2.2 and Rake db:migrate

2008-11-05 Thread tm
Hello, I have a problem when I execute rake db:migrate (in /Users/miguelati/Proyectos/Proyectos Ruby/foro) rake aborted! can't convert Fixnum into String With trace: ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted!

[Rails] Re: m:n realtions don't work with fixtures?!

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 15:03, Heinz Strunk wrote: > > Hello, > > I'm currently trying to populate my database with fixtures and > having a > problem. > > The table USER has many GROUPS he belongs to and vice versa so it's > m:n > relationship. > > Model: > class User < ActiveRecord::Base > has_m

[Rails] Re: observe_field with select throwing javascript error

2008-11-05 Thread Corey Murphy
> Are there any other objects on the page with id transaction_type ? (or > to put things another way, if you evaluate $('transaction_type') in > the firebug console, what do you get?) > > Fred You nailed it Fred. I had stripped out the rest of the page to simplify what was going on to see if

[Rails] m:n realtions don't work with fixtures?!

2008-11-05 Thread Heinz Strunk
Hello, I'm currently trying to populate my database with fixtures and having a problem. The table USER has many GROUPS he belongs to and vice versa so it's m:n relationship. Model: class User < ActiveRecord::Base has_many :user_groups, :dependent => :nullify has_many :groups, :through => :u

[Rails] observe_form should only react to changes in the form

2008-11-05 Thread morgler
I have a problem with observe_form: <%= observe_form( "search_form", :frequency => 0.25, :update => "search",

[Rails] Moving Back From ActiveRecord Session Store to cookie

2008-11-05 Thread John Kopanas
A couple months ago I moved from storing sessions in the default cookie store to active_record. Now I kind of want to move back because I am not sure I see any benefit of it but many negatives i.e. it is not easy on my over taxed DB server as is. The problem is that I thought it was going to be as

[Rails] Re: Gem as Plugin

2008-11-05 Thread Robert Walker
> Iam not sure what is the problem? Is it because I moved the gems to the > vendor folder? Generally how can we conver the gem as plugin? If you are using the latest Rails 2.1.x then you want to look into gem dependencies. Rails 2.1 has support for managing and freezing gem dependencies. No nee

[Rails] Re: difficulty in understanding the valgrind output for ror app.

2008-11-05 Thread Mike Dalessio
On Nov 5, 1:09 am, Santosh Turamari <[EMAIL PROTECTED]> wrote: > Hi, > I am facing the difficulty in understanding the output of valgrind > memory leaks. How to interpret it. pls help me out. For the ruby interpreter, you should probably think about running valgrind with the following options:

[Rails] Re: Problems w/ before_filter getting ignored

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 04:41, Clem Rock wrote: > > For some reason, when I login the last request.request_uri address > that > is stored in the session is /login. For some reason, the > store_location method is still getting called when the login method is > called and then throws a "Redirect Lo

[Rails] Re: Problems w/ before_filter getting ignored

2008-11-05 Thread Clem Rock
torm3nt wrote: > hmmm > > I'm just guessing here, but have you tried creating a method in your > ApplicationController called store_location, which then makes the > appropriate module calls? > > I'm guessing that ApplicationController can't see the store_location > method in your module. Thank

[Rails] Re: My rake is broken - "no such file to load..."

2008-11-05 Thread Max Williams
I figured this out - it was because i'd updated rubygems, which was now looking in a different folder for the gems than the one they were living in. So, my gems were all missing, effectively. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You r

[Rails] Re: Time zone and UTC offset

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 09:09, MR Damien wrote: > > Frederick Cheung wrote: >> On Nov 4, 5:32�pm, MR Damien <[EMAIL PROTECTED]> >> wrote: >>> Time.zone = @time_zone # 'Paris' >>> code, it failed. >>> >> Are you sure your date is an instance of Time and not an instance of >> Date? (for Date - 1 means

[Rails] Muliply images > wich plugin?

2008-11-05 Thread Remco Swoany
Hi, I have one destionation such as Barcelona and i want to store and show multiply pictures of Barcelona. Wich upload plugin is the best for this purpose? Grtz..remco -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message bec

[Rails] Re: R2.2: config.gems

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 12:27, fredistic wrote: > > What does the new config.gems get you that the old $GEM_PATH and > $GEM_HOME does not? > That everything in your app is under source control (and conversely deploying/updating your app just implies checking out the code) Fred > See http://wiki.ru

[Rails] Re: upload an image

2008-11-05 Thread Thorsten Müller
the view: <% form_for(@user, :url => (@edition ? user_path() : user_path), :method => :put, :html => {:multipart => true}) do |f| %> <%= f.file_field(:user_image_file) %> <%= submit_tag('Save') %> <% end %> in the controller: if params[:user][

[Rails] upload an image

2008-11-05 Thread Ishara Gunathilake
can anyone give me the code for upload an image,,i try in various ways such as acts_as_attatchment plugin but it wasn't work..now im in a big trouble,,,plz give me another solution to this --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Rails] Re: observe_field with select throwing javascript error

2008-11-05 Thread Frederick Cheung
On 5 Nov 2008, at 12:46, Mark Reginald James wrote: > > Corey Murphy wrote: >> Using the following simple form with a select box, the >> observe_field is >> throwing a javascript error related to the "getValue()" method in the >> prototype library. Any ideas as to why? Everything that I can

[Rails] Re: observe_field with select throwing javascript error

2008-11-05 Thread Mark Reginald James
Corey Murphy wrote: > Using the following simple form with a select box, the observe_field is > throwing a javascript error related to the "getValue()" method in the > prototype library. Any ideas as to why? Everything that I can tell is > well formed syntactically. I'm running Rails 2.1.0. >

[Rails] Re: can load gem with irb but application fails

2008-11-05 Thread fredistic
When you issue the original 'rails' command, to populate the directory, it seems to embed gem version numbers here and there. Try creating a virgin directory with and diffing the created files with the stuff in your directory. Especially the config and environment stuff. Also see http://wiki.ru

[Rails] R2.2: config.gems

2008-11-05 Thread fredistic
What does the new config.gems get you that the old $GEM_PATH and $GEM_HOME does not? See http://wiki.rubyonrails.org/rails/pages/HowToUseMultipleGemRepositories I just have a global gems repo, and the wider use-any-gem functionality of vendor/gems for all gems, not just rails, by setting: GEM_HO

  1   2   >