[Rails] Re: Jasper reports and iReport

2010-03-08 Thread Md. mujahidul islam Khan
Herman Jansen wrote: > @Fred > Thanks Fred. It works the way you suggested. > > @Peter > It's based on > http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports > , so it's command line and it's fast enough for me. > Where do you think I should put the Wiki description ? Hi I am new

[Rails] Noob issue with virtual attributes

2010-03-08 Thread Greg Ma
Hello, I have 2 models, city and tip. A city an have only one tip. So what i am trying to do is to add my tip properties to the city form and create or update the city with his child the tip. but what i've done so far isn't working... I have this error: undefined method `build' for nil:NilClass Mo

Re: [Rails] Uploading any type of file faster in rails

2010-03-08 Thread Arun Kumar
Thanks Peter De Berdt, The explanation clear and cool, will check with that and come back again for nice discussion with you. On Mon, Mar 8, 2010 at 9:40 PM, Peter De Berdt wrote: > > On 08 Mar 2010, at 11:43, Arun Kumar wrote: > > I am working in rails (1.2.6 version), i developed file uploa

[Rails] Re: Scaffolding oddities -- any ideas?

2010-03-08 Thread RichardOnRails
I got it straightened out. Thanks anyway in case you looked at my now- solved problems. On Mar 8, 12:27 pm, RichardOnRails wrote: > Hi All, > > I’ve got a couple of problems and solutions I’ll try unless I get > guidance for more Rails-like approaches.  Details follow. > > Thanks is advance, > R

Re: [Rails] Re: Re: Re: Re: how to obtain the index of selected item from select box?

2010-03-08 Thread Nitin Rajora
Sincerely, glad you made it work. Nitin. On Tue, Mar 9, 2010 at 10:13 AM, Veena Jose wrote: > > Thanku Thanku Thanku s muchYou have really helped me a > lot. > The thing you assumed is right for some extend. > > 1. Readings table initially is showing all current_readings for

[Rails] Re: Re: Re: Re: how to obtain the index of selected item from select box?

2010-03-08 Thread Veena Jose
Thanku Thanku Thanku s muchYou have really helped me a lot. The thing you assumed is right for some extend. 1. Readings table initially is showing all current_readings for all stations on index page 2. There is a stations dropdown filled with all the states in the "stations

[Rails] Re: Need to DRY views for a global menu

2010-03-08 Thread RichardOnRails
OK Craig, I got it: I missed the _ in the name. Problem solved. Thank you very much for your help. Best wishes, Richard On Mar 8, 10:06 pm, Craig White wrote: > On Mon, 2010-03-08 at 18:52 -0800, RichardOnRails wrote: > > Hi Craig, > > > Thanks for your response. > > > > you need to use 'temp

Re: [Rails] File Upload - Preserving Original File Name

2010-03-08 Thread Jamey Cribbs
Try this: File.open(File.join(params[:upload_directory], params[:file2upload].original_filename),'wb'){ |f| f.write(params[:file2upload].read) } Jamey On Mon, Mar 8, 2010 at 9:56 PM, doug wrote: > I am using the following line of code in an action to provide a file > upload capability. > >

[Rails] Re: making a generic comment model

2010-03-08 Thread eggie5
thanks you! polymorphic association it's called you say. It works now. On Mar 9, 12:08 pm, Daniel Guettler wrote: > You want to make comment a polymophic association > e.g. on your person and family model you have: > > has_many :comments, :as => :attachable > > then on the comment class you have:

[Rails] Re: Need to DRY views for a global menu

2010-03-08 Thread RichardOnRails
Thanks again, Craig. I saw and understood and tried to respond to that message. Following is the a session in a Command Window on my Win-XP/SP3 system that seem to provide the alleged missing code: K:\_Projects\Ruby\_Rails_Apps\_EIMS\RTS>cd app\views\shared K:\_Projects\Ruby\_Rails_Apps\_EIMS\R

[Rails] Re: Re: edit existing PDF as template

2010-03-08 Thread John Wu
Thank you so much! I tried the code and got uninitialized constant HomeController::Fdf -- 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-t...@goog

[Rails] Re: making a generic comment model

2010-03-08 Thread Daniel Guettler
You want to make comment a polymophic association e.g. on your person and family model you have: has_many :comments, :as => :attachable then on the comment class you have: belongs_to :attachable, :polymorphic => true and in your table for comments you have: integer :attachable_id string :attac

Re: [Rails] Re: Need to DRY views for a global menu

2010-03-08 Thread Craig White
On Mon, 2010-03-08 at 18:52 -0800, RichardOnRails wrote: > Hi Craig, > > Thanks for your response. > > > you need to use 'templates' but this is rather elemental > > You're spot on. This is my first "real" Rails app (for my son who > runs a couple of private schools). So I'd like to get this w

[Rails] File Upload - Preserving Original File Name

2010-03-08 Thread doug
I am using the following line of code in an action to provide a file upload capability. File.open(params[:upload_directory]+'/'+'test1','wb'){|f| f.write(params[:file2upload].read)} Admittedly, I'm not real clear on exactly how the above line works; but, it does work. I'm wondering if there is a

[Rails] Re: Need to DRY views for a global menu

2010-03-08 Thread RichardOnRails
Hi Craig, Thanks for your response. > you need to use 'templates' but this is rather elemental You're spot on. This is my first "real" Rails app (for my son who runs a couple of private schools). So I'd like to get this working in a timely but correctly implement fashion. Following your link,

[Rails] making a generic comment model

2010-03-08 Thread eggie5
I have a Comment model obviously to make comments. I have also a Person and Family class and I want to make comments on bother a person and a family. How can I set this up. I want to use the same generic comments table for all the comments on both person and family model. I can't figure it out, I c

[Rails] Routes & Link_to

2010-03-08 Thread Greg Ma
Hi, I really don't know if i am doing this correctly, so please tell me if so. I have a product model who has many ingredients. So in my product form i've added a text_field to put the ingredient, and create or find it on the "add" action. Here is what i've done View: <% form_for @product do |f| %

Re: [Rails] Re: edit existing PDF as template

2010-03-08 Thread Craig White
On Tue, 2010-03-09 at 02:12 +0100, John Wu wrote: > Thanks for response. > > Can you give me an example for this? Can prawn edit existing pdf file? > > > Craig White wrote: > > On Tue, 2010-03-09 at 01:29 +0100, John Wu wrote: > >> Hi, > >> > >> I am new to rails. I need to edit an existing pdf

[Rails] Re: edit existing PDF as template

2010-03-08 Thread John Wu
Thanks for response. Can you give me an example for this? Can prawn edit existing pdf file? Craig White wrote: > On Tue, 2010-03-09 at 01:29 +0100, John Wu wrote: >> Hi, >> >> I am new to rails. I need to edit an existing pdf file and fill in some >> data and send it to browser, how to implemen

[Rails] noob question on associated records and their controller structure

2010-03-08 Thread Grary
Hi, I have controllers for two models between which there exists a belongs_to/has_one relationship. How do I reference the parent model object in the child controller so that I can later recover the child object in the parent controller, i.e., create and "attach" the child to the parent model for

Re: [Rails] edit existing PDF as template

2010-03-08 Thread Craig White
On Tue, 2010-03-09 at 01:29 +0100, John Wu wrote: > Hi, > > I am new to rails. I need to edit an existing pdf file and fill in some > data and send it to browser, how to implement this? Is there an example > online I can look at it? I do this using pdftk and using rails to output the fdf data

Re: [Rails] Need to DRY views for a global menu

2010-03-08 Thread Craig White
On Mon, 2010-03-08 at 16:20 -0800, RichardOnRails wrote: > Hi All, > > I've got a bunch of views for Vendors and Users, e.g. app\views\vendors > \index.html.erb: > > Listing vendors > > > <%= link_to 'Vendor', :controller=>'vendors', >

[Rails] edit existing PDF as template

2010-03-08 Thread John Wu
Hi, I am new to rails. I need to edit an existing pdf file and fill in some data and send it to browser, how to implement this? Is there an example online I can look at it? Thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google G

[Rails] Need to DRY views for a global menu

2010-03-08 Thread RichardOnRails
Hi All, I've got a bunch of views for Vendors and Users, e.g. app\views\vendors \index.html.erb: Listing vendors <%= link_to 'Vendor', :controller=>'vendors', :action=>'index' %>   <%= link_to 'User'

Re: [Rails] Google Analytics and partials

2010-03-08 Thread Craig White
On Mon, 2010-03-08 at 13:43 -0800, Philip Hallstrom wrote: > > I have been tracking users with Google Analytics via the javascript > > code > > in the header of my main template and that works very well. > > > > I've come to realize that there are a few places where I have > > will_paginate and s

[Rails] Re: How to access local parameters in partials?

2010-03-08 Thread Fritz Trapper
It was my fault, sorry. -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to ruby

[Rails] Re: How to access local parameters in partials?

2010-03-08 Thread Fritz Trapper
Thanks for your reply. Changeing selectFinder to select_finder doesn't help. -- 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-t...@googlegroups.com

Re: [Rails] Re: install problems on fedora 12

2010-03-08 Thread Greg Donald
On Mon, Mar 8, 2010 at 4:38 PM, Jedrin wrote: >  I do0n't need the most recent version, I'm just trying to get > something that works. I was using rails 2.3.2 on centos, but I am > switching to fedora because I had other problems with centos, but I > never had to build stuff with compiling source

Re: [Rails] install problems on fedora 12

2010-03-08 Thread Craig White
On Mon, 2010-03-08 at 14:28 -0800, Jedrin wrote: > I just got set up with fedora 12 and am a new user for that distro. > > I got ruby 1.8.6 installed. Then I tried to install rails using yum > which gave me rails 2.3.4. When I tried to start a rails project I had > an error saying the wrong versio

[Rails] Re: install problems on fedora 12

2010-03-08 Thread Jedrin
> You're never going to find a distro that can keep up with the speed of > Rails releases.  I always go it alone and installing everything from > source, including ruby. > I do0n't need the most recent version, I'm just trying to get something that works. I was using rails 2.3.2 on centos, but I

[Rails] Re: ActiveRecord::ReadOnlyRecord on attributes_update

2010-03-08 Thread Greg Ma
Sorry but i'm not sure where do I have to put a join. here is my code: class Product < ActiveRecord::Base attr_accessible :name, :prod_type, :min_visit, :max_visit, :price, :visible, :ingredient_attributes has_and_belongs_to_many :ingredients belongs_to :city_preferences :city_preferences

[Rails] Re: How to access local parameters in partials?

2010-03-08 Thread Robert Walker
Fritz Trapper wrote: > In my template, I call this partial with an additional parameter: > > > <%= render :partial => "shared/finder_list_header.html.erb", :locals => > { :selectFinder => true } %> > ... > > > Inside the partial I try to access selectFinder: > > <% if selectFinder %> >

Re: [Rails] install problems on fedora 12

2010-03-08 Thread Greg Donald
On Mon, Mar 8, 2010 at 4:28 PM, Jedrin wrote: > I just got set up with fedora 12 and am a new user for that distro. > > I got ruby 1.8.6 installed. Then I tried to install rails using yum > which gave me rails 2.3.4. You're never going to find a distro that can keep up with the speed of Rails rel

[Rails] install problems on fedora 12

2010-03-08 Thread Jedrin
I just got set up with fedora 12 and am a new user for that distro. I got ruby 1.8.6 installed. Then I tried to install rails using yum which gave me rails 2.3.4. When I tried to start a rails project I had an error saying the wrong version of rack was supplied. I tried to resolve that with gem in

[Rails] How to access local parameters in partials?

2010-03-08 Thread Fritz Trapper
In my template, I call this partial with an additional parameter: <%= render :partial => "shared/finder_list_header.html.erb", :locals => { :selectFinder => true } %> ... Inside the partial I try to access selectFinder: <% if selectFinder %> <% end %> and get an error message: undef

[Rails] Re: validation and STI

2010-03-08 Thread eugenio
On 8 Mar, 22:14, Jay P wrote: > What version of rails are you using? i'm using rails 2.3.5 i tried to insert some User models with the web interface and the validation works there. maybe it's only an sql cache issue. > > I just read "This seems to be a regression issue > on Rails 2.3, works fin

[Rails] Instantiating Controller Object on Rails3 for unit testing

2010-03-08 Thread Joshua Partogi
Dear all, I am experiencing this error when doing unit testing: Authlogic::Session::Activation::NotActivatedError: You must activate the Authlogic::Session::Base.controller with a controller object before creating objects I know this is not an error from Rails but I encounter this when doing unit

Re: [Rails] Google Analytics and partials

2010-03-08 Thread Philip Hallstrom
I have been tracking users with Google Analytics via the javascript code in the header of my main template and that works very well. I've come to realize that there are a few places where I have will_paginate and some cascading collections where there are partials that update but the entire pag

Re: [Rails] Modelling question

2010-03-08 Thread Colin Law
On 8 March 2010 21:03, Greg Ma wrote: > Hi, > > I have these 3 models: > City :name > Product :name > city_preference :city_id, :product_id, :min, :max > > > > How do i create the associations between these tables? Have a look at the rails guide on ActiveRecord Associations at http://guides.rubyo

[Rails] Re: Modelling question

2010-03-08 Thread Jay P
Look up has_many and belongs_to On Mar 8, 4:03 pm, Greg Ma wrote: > Hi, > > I have these 3 models: > City :name > Product :name > city_preference :city_id, :product_id, :min, :max > > How do i create the associations between these tables? > Best > Greg > -- > Posted viahttp://www.ruby-forum.com/.

[Rails] Re: validation and STI

2010-03-08 Thread Jay P
What version of rails are you using? I just read "This seems to be a regression issue on Rails 2.3, works fine on previous rails versions" On Mar 8, 4:10 pm, eugenio wrote: > i got a problem with validation and sti class > > Account < ActiveRecord::Base >   validates_uniqueness_of :field1 >   ..

[Rails] RoR Developer Needed For Long Term Project [Jobs]

2010-03-08 Thread Blue Dog
We are currently seeking a very experienced Ruby on Rails developer to complete our Rails development; a social networking platform for businesses and their customers. The project is 90%-95% complete, but we need someone (or some company) to complete it and provide the ongoing support and long ter

[Rails] Re: ActiveRecord::ReadOnlyRecord on attributes_update

2010-03-08 Thread Frederick Cheung
On Mar 8, 8:09 pm, Greg Ma wrote: > Hi, > > I have a ActiveRecord::ReadOnlyRecord error when i update child > attributes whereas when i create a new one it works fine. > find marks records as read only if you specify a :joins option (you can override this with :readonly => false) Fred > Someon

[Rails] validation and STI

2010-03-08 Thread eugenio
i got a problem with validation and sti class Account < ActiveRecord::Base validates_uniqueness_of :field1 ... end User < Account ... end i created a few User models in the bootstrap file and i noticed that the validation does not work. Do you know why? -- You received this message beca

[Rails] Modelling question

2010-03-08 Thread Greg Ma
Hi, I have these 3 models: City :name Product :name city_preference :city_id, :product_id, :min, :max How do i create the associations between these tables? Best Greg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby

Re: [Rails] Attaching, literally, a link

2010-03-08 Thread Rick DeNatale
On Mon, Mar 8, 2010 at 3:40 PM, theduz wrote: >    attachment :content_type => "message/external-body; access- > type=URL;" do |a| >      a.transfer_encoding = "binary" >      a.body = "URL=\"http://www.biltd.com\"\n\nContent-type: text/html > \nContent-Transfer-Encoding: Binary\n\nTHIS IS NOT T

[Rails] Re: How to change a text field's contents to all uppercase letter

2010-03-08 Thread Viorel
What errors? On Mar 8, 4:29 am, xxdesmus wrote: > I tried date_select but I kept getting a bunch of errors. > > On Mar 7, 3:01 pm, Viorel wrote: > > > > > > Hey, you don't happen to know of a simple way of implementing a date > > > picker for a field in a form do you? I was hoping to accomplish

[Rails] Attaching, literally, a link

2010-03-08 Thread theduz
Hi, I'm trying to avoid sending large PDF's via email. My current strategy is to put a link to the document or web page into the e-mail, and it works just fine, but I'm getting complaints that "the attachment is missing". Is there a way to have a link show up as an attachment? I've tried to use

[Rails] Re: Routing problem, I think

2010-03-08 Thread Marnen Laibow-Koser
RichardOnRails wrote: > Hi Colin, > > Thanks for the encouragement. I swear I'll start employing subversion > after I meet my two-week deadline on the first phase of the project > I'm on. > > Best wishes, > Richard You're kidding, right? Git in particular is very quick to set up. Do it *now*

Re: [Rails] Re: searching based on the return values of instance methods

2010-03-08 Thread Ease Bus
marikka! awesome. Thanks for sharing. On Mon, Mar 8, 2010 at 8:35 AM, marikka wrote: > Thanks Jarin for the idea! > > I used named scopes in my user model like this: > > named_scope :age_gt, lambda { |age| { :conditions => ['birthdate < ?', > age.to_i.years.ago] }} > named_scope :age_lt, lambda

Re: [Rails] Re: calling save changes a date field in my model instance to 2000

2010-03-08 Thread Paul Rubel
Frederick Cheung writes: > > > On Mar 8, 2:47 pm, Paul Rubel wrote: > > Hi, > > I have a bunch of data in a text file that I'd like to place in my > > DB but am ending up with odd results when I save the data. > > > > Here's my model: > > > >     class CreateWaits < ActiveRecord::Mi

[Rails] ActiveRecord::ReadOnlyRecord on attributes_update

2010-03-08 Thread Greg Ma
Hi, I have a ActiveRecord::ReadOnlyRecord error when i update child attributes whereas when i create a new one it works fine. Someone had this error? Best, greg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rai

[Rails] Re: Re: Extending a Model that is in a plugin

2010-03-08 Thread Yanni Mac
Yanni Mac wrote: > Additionally, you can include a default class in your plugin. This > would give you the model out of the box when you install the plugin, so > you don't even have to create a model in /app/models/ > > #--- > # /my_rails_

[Rails] Clearance issues

2010-03-08 Thread Jeremy Woertink
I'm really trying to use bundler, but I seem to be running into way more problems then it seems worth. Now, this issue I'm having might not be related directly to bundler, but I can't figure out what else could be causing it. My Gemfile source :gemcutter gem "rails", "~> 2.3.5", :require => nil g

[Rails] tiny mce and link to remote

2010-03-08 Thread Hans
I uses tiny mce in my rails application successfully, but when I try to use it in a form_for on a page that have been loaded by link_to_remote tiny mce does not work any more. How to solve this problem ? Any other html editor that may work in this situation. I tried fckeditor, but the problem was

Re: [Rails] datatype error in ROR

2010-03-08 Thread mamathahl
Thanks once again. I'm sorry for giving you the trouble to scroll down to see the query that I was referring to. I am quite new to nabble. henceforth, I'll make it a point to top post such things Colin Law-4 wrote: > > On 8 March 2010 03:38, mamathahl wrote: >> >> Colin, this is in a migrati

[Rails] Scaffolding for nested models

2010-03-08 Thread Ahmed Abdelsalam
Hi, I'm developing application that contains many nested models. Can I use scaffolding command to generate the application nested models instead of manually creating the complex nested models? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to t

[Rails] Re: calling save changes a date field in my model instance to 2000

2010-03-08 Thread Frederick Cheung
On Mar 8, 2:47 pm, Paul Rubel wrote: > Hi, > > I'm having a problem with dates (laugh if you must :). > > $ rails --version > Rails 2.3.5 > $ ruby --version > ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] > > I have a bunch of data in a text file that I'd like to place in my > DB but am

Re: [Rails] Connecting to sessions table in another database

2010-03-08 Thread Hassan Schroeder
On Sat, Mar 6, 2010 at 5:55 PM, tispratik wrote: > I created the sessions table in appA. How do i access the sessions > table in appB. > I tried to put ActiveRecord::Base.establish_connection :appA in the > config\initializers\session_store.rb of appB, > but that connects the whole appB applicati

[Rails] Re: searching based on the return values of instance methods

2010-03-08 Thread marikka
Thanks Jarin for the idea! I used named scopes in my user model like this: named_scope :age_gt, lambda { |age| { :conditions => ['birthdate < ?', age.to_i.years.ago] }} named_scope :age_lt, lambda { |age| { :conditions => ['birthdate > ?', age.to_i.years.ago] }} now I don't need to use a special

[Rails] Nested Resources + Namespace + Friendly URL

2010-03-08 Thread Ronald Rails
Hi, all In my rails app I have a controller called Dashboard::MenusController with a namespace dashboard. I have a model Company too, where its has_many :menus So, I have the code above in my route.rb map.namespace (:dashboard) do |dashboard| dashboard.resources :companies, :

[Rails] calling save changes a date field in my model instance to 2000

2010-03-08 Thread Paul Rubel
Hi, I'm having a problem with dates (laugh if you must :). $ rails --version Rails 2.3.5 $ ruby --version ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] I have a bunch of data in a text file that I'd like to place in my DB but am ending up with odd results when I save the data. Here's

[Rails] Re: Better way to concatenate options to collection_select?

2010-03-08 Thread Jack o'Shanter
Frederick Cheung wrote: > In a small experiment, > > collection_select :thread, 'forum_id', @forums, :id, :name, :prompt => > true, :include_blank => 'All' > > seems to work for me. If that doesn't work out, i'd use select instead > of collection_select - collection_select is trying to make one u

[Rails] Scaffolding oddities -- any ideas?

2010-03-08 Thread RichardOnRails
Hi All, I’ve got a couple of problems and solutions I’ll try unless I get guidance for more Rails-like approaches. Details follow. Thanks is advance, Richard I. Problems and possible solutions: The user CRUD works fine except: 1) When user data is supplied and Create is clicked, the “suc

[Rails] Re: Need some meta-programming for a Rails app

2010-03-08 Thread RichardOnRails
Hi sax, Thanks for the ideas. I'll have to study them to see what I can apply. Right now, I'm back after a week of illness and facing a two- week deadline on my current project, so it'll take me a little time to get my arms around "Rails Meta-programming". Best wishes, Richard On Mar 3, 2:52 

[Rails] Re: Re: Extending a Model that is in a plugin

2010-03-08 Thread Yanni Mac
Additionally, you can include a default class in your plugin. This would give you the model out of the box when you install the plugin, so you don't even have to create a model in /app/models/ #--- # /my_rails_app/vendor/plugins/my_plugin/

[Rails] Re: Routing problem, I think

2010-03-08 Thread RichardOnRails
Hi Colin, Thanks for the encouragement. I swear I'll start employing subversion after I meet my two-week deadline on the first phase of the project I'm on. Best wishes, Richard On Mar 3, 4:56 pm, Colin Law wrote: > On 3 March 2010 21:26, RichardOnRails > > wrote: > > Hi All, > > > I got the l

[Rails] Re: Re: Extending a Model that is in a plugin

2010-03-08 Thread Yanni Mac
Andy, Thanks for all your responses. This helped me do some additional research. I found something that works perfectly for my scenario. Using mixin modules. http://weblog.jamisbuck.org/2007/1/17/concerns-in-activerecord I tried using mixins earlier today, but I was not able to use the asso

Re: [Rails] Uploading any type of file faster in rails

2010-03-08 Thread Peter De Berdt
On 08 Mar 2010, at 11:43, Arun Kumar wrote: I am working in rails (1.2.6 version), i developed file upload using file_column plugin in my application, it is working fine, but thought that it is bit slow. i need another upload system that make the rails faster for upload and it should matc

Re: [Rails] Re: Extending a Model that is in a plugin

2010-03-08 Thread Andy Jeffries
> > Andy, thank you very much for the reply. If I can get the first > solution to work, I think I would prefer that. I have been playing > around with the code and I am getting errors saying my model class (in > rails dir) should define Widget. This normally means that you have a file named "wi

[Rails] downloading a file from a remote server ?

2010-03-08 Thread Erwin
I am using the Paperclip plugin to store video attachments into a remote server (via an ftp storage module written by Damian Caruso) it works well... Now I would like my web app user to be able to download back this attachment into their local pc I can use def download .. Net::SCP.start( hos

[Rails] Re: Extending a Model that is in a plugin

2010-03-08 Thread Yanni Mac
Andy, thank you very much for the reply. If I can get the first solution to work, I think I would prefer that. I have been playing around with the code and I am getting errors saying my model class (in rails dir) should define Widget. So is it even possible to use Widget as the name in the p

[Rails] Re: Wits end..."cross-thread violation on rb_gc()"

2010-03-08 Thread Jean Nibee
"Reset" my system by reinstalling the OS (Was the only way I could guarantee I got everything put back in), did the sytem update and also installed/upgraded XCods to resolve some 'make' issues caused by the OS reinstall. Ruby and Rails (2.3.x) is working up to the point I try and migrate a DB

Re: [Rails] Re: How to change a text field's contents to all uppercase letter

2010-03-08 Thread Michael Pavling
On 7 March 2010 14:16, xxdesmus wrote: > Not having any luck with Calendar Date Select so far ... got it > installed, but it looks like the documentation is out of date @ > http://www.railslodge.com/plugins/46-calendar-date-select  ...I can't > for the life of me get the pop-up or embedded calenda

[Rails] to_xml repeating elements and plain strings

2010-03-08 Thread Harry Wood
Say I want to output XML like this: 123 apple banana pear lemon Is there a way of doing that with to_xml? It seems like there's two problems: to_xml always creates a wrapping element when it encounters an array, and... You can put plain strings into hash values and it works, but pl

[Rails] betternestedset in rails 3.0

2010-03-08 Thread Vipin Vm
Hi Guys, when i upgraded my rails 2.3.4 to 3.0 my betternestedset is not working. It was working fine in the older version. This is my controller def new cat = Category.new cat.text='test' cat.save cat.move_to_child_of(Category.find_by_id(1)) #26 redirect_to :action => 'inde

Re: [Rails] Re: :joins help

2010-03-08 Thread Xavier Noria
Just in case... you know :include don't you? -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr.

[Rails] Re: :joins help

2010-03-08 Thread Frederick Cheung
On Mar 8, 11:41 am, Newb Newb wrote: > Thanks for the reply... > Then how can i get associated field also > It's just the output of inspect that is limited - every else works fine (provided you change the select clause via the :select option) Fred -- You received this message because you

[Rails] Re: :joins help

2010-03-08 Thread Newb Newb
Thanks for the reply... Then how can i get associated field also -- 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-t...@googlegroups.com. To un

[Rails] Re: :joins help

2010-03-08 Thread Frederick Cheung
On Mar 8, 10:30 am, Newb Newb wrote: > Dear all > > @policy_logs = PolicyLog.find(:all,:joins => "INNER JOIN po > licy_logs_receiver" > >                                      ) > > when i inspect the @policy_logs variable it doesnot show the joined > table fields... > the select clause is selec

[Rails] Re: Reporting

2010-03-08 Thread Saboor Saboor
Thanks! thead {display: table-header-group;} it is working fine. -- 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-t...@googlegroups.com. To unsub

[Rails] Uploading any type of file faster in rails

2010-03-08 Thread Arun Kumar
Hi all, I am working in rails (1.2.6 version), i developed file upload using file_column plugin in my application, it is working fine, but thought that it is bit slow. i need another upload system that make the rails faster for upload and it should match for my version (1.2.6). Instead of uploadi

[Rails] :joins help

2010-03-08 Thread Newb Newb
Dear all @policy_logs = PolicyLog.find(:all,:joins => "INNER JOIN po licy_logs_receiver" ) when i inspect the @policy_logs variable it doesnot show the joined table fields... how can i get all the fields? Thanks for nay help -- Posted via http://www.ruby-

Re: [Rails] Reporting

2010-03-08 Thread tommy xiao
hi,guys, this is not rails problems,only html is key point.this link may help you . http://www.terminally-incoherent.com/blog/2009/10/12/repeating-html-table-headers-on-each-printed-page/ 2010/3/8 Saboor Saboor > Hi, > i am a new ruby on rails user. > while in my project, i have displayed som

[Rails] Re: Re: Re: Parsing XML file with no style info with Hpricot

2010-03-08 Thread Allan Last
Thanks everybody. I saw the info on the source. I figured it out. -A Hassan Schroeder wrote: > On Sun, Mar 7, 2010 at 10:18 AM, Allan Last > wrote: > >> I'm expecting the XML information seen here on Firefox: > / >> to be displayed when I parse the MLB file. Hpricot is not parsing this >> file

Re: [Rails] Array of check boxes and html warning

2010-03-08 Thread Andy Jeffries
> > Rather to my surprise this has removed the warnings (it is the html > validator plugin for FF that is showing the warnings of course, not > firebug). Always glad to surprise you. > I am surprised as I thought that the name and id both have > to be unique and while this fixes the id the name

Re: [Rails] Array of check boxes and html warning

2010-03-08 Thread Colin Law
On 8 March 2010 08:55, Andy Jeffries wrote: >> <%= check_box_tag "note[froglet_ids][]", froglet.id %> <%= h >> froglet.name %> >> >> These get submitted as an array and all works well, except for the >> fact that firebug gives me warnings on the page (anchor >> note_froglet_ids_ is already defined

[Rails] Reporting

2010-03-08 Thread Saboor Saboor
Hi, i am a new ruby on rails user. while in my project, i have displayed some data from db in tabular form contain a header , body and footer. now there is a print page option. so when i print the data (consist of 4-5 pages), the header comes on the first page, i want the header of the report to co

Re: [Rails] Where can I read about f.submit?

2010-03-08 Thread Andy Jeffries
> > It is a bit odd that f.submit is not explicitly documented in more > places. It is effectively the same as submit_tag I think. Google for > rails form_for "f.submit" > will throw up some useful hits. What you really want to be googling for is FormBuilder as it's the FormBuilder that has the

Re: [Rails] Where can I read about f.submit?

2010-03-08 Thread Colin Law
On 8 March 2010 06:11, Frank Huster wrote: > Hi, > ror newbie here. > > I guess this is more of a "how do I get information" question than > anything. > > The generator inserts f.submit statements in forms and I'm looking at > the documentation for submit but can't find it anywhere. > I looked at:

[Rails] Re: Re: Re: how to obtain the index of selected item from select box?

2010-03-08 Thread Veena Jose
Veena Jose wrote: > Nitin Rajora wrote: >> Your routes file is missing. And on which page do you need the >> functionality >> working.. ? >> (without css it is looking all black and white) >> Nitin.. > I want the things to be working on the readings/index -- Posted via http://www.ruby-forum.com

[Rails] Re: Re: Re: how to obtain the index of selected item from select box?

2010-03-08 Thread Veena Jose
Nitin Rajora wrote: > Your routes file is missing. And on which page do you need the > functionality > working.. ? > (without css it is looking all black and white) > Nitin.. Hai Nitin, I have attached the css and the config directory Thanks, Veena Attachments: http://www.ruby-forum.com/

Re: [Rails] Re: Re: how to obtain the index of selected item from select box?

2010-03-08 Thread Nitin Rajora
Your routes file is missing. And on which page do you need the functionality working.. ? (without css it is looking all black and white) Nitin.. On Mon, Mar 8, 2010 at 12:43 PM, Veena Jose wrote: > > > 3. Now we are talking about ReadingsController index action with a list > > of > > all locatio

Re: [Rails] datatype error in ROR

2010-03-08 Thread Colin Law
On 8 March 2010 03:38, mamathahl wrote: > > Colin, this is in a migration. > But I did not understand the last para of your reply. Have a look at http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/f23f96c71facf726 for a discussion on why it is not a good idea to seed in migrati

Re: [Rails] Extending a Model that is in a plugin

2010-03-08 Thread Andy Jeffries
On 26 February 2010 17:35, Yanni Mac wrote: > I have several apps that share common base models which I am coding into > a plugin, but each app may need to add some additional code or override > some code in the plugin model. > OK, so let's assume your base model is like this: class MyPlugin::

Re: [Rails] similar controller::layout functionality

2010-03-08 Thread anl hp
forget it guys, it was a before_filter :authorize that I forgot to eliminate ^^ thanks -- anl On Mon, Mar 8, 2010 at 12:23 AM, anler wrote: > hi folks, I need help with something, I got a controller and I want be > able to use a class method defined in ApplicationController as I do > with (let

Re: [Rails] Array of check boxes and html warning

2010-03-08 Thread Andy Jeffries
> > <%= check_box_tag "note[froglet_ids][]", froglet.id %> <%= h > froglet.name %> > > These get submitted as an array and all works well, except for the > fact that firebug gives me warnings on the page (anchor > note_froglet_ids_ is already defined) as all the checkboxes have the > same name attr

[Rails] Re: Re: Re: how to obtain the index of selected item from select box?

2010-03-08 Thread Veena Jose
Hai Nitin, I am sending you the app and migrations folder.Please have a look.I know that i am asking too many questions..Sorry 4 troubling you... Thank you very much Veena Attachments: http://www.ruby-forum.com/attachment/4544/app_n_migrations.rar -- Posted via http://www.ruby-foru

[Rails] Re: Dynamically Defined URLs on S3

2010-03-08 Thread Sandy
Sorry, I should have mentioned that I'm using Paperclip. On Mar 8, 12:17 am, Sandy wrote: > I realize that S3 buckets do not contain folders, but that they do > permit the use of filenames which contain the "/" character, thereby > giving the appearance of folders ("pseudofolders").  I want to be

[Rails] similar controller::layout functionality

2010-03-08 Thread anler
hi folks, I need help with something, I got a controller and I want be able to use a class method defined in ApplicationController as I do with (let say) the 'layout' function I'm new in Rails and Ruby but I know enough CakePHP to be aware of the conventions a stuff like that The way I'm doing it

  1   2   >