[Rails] what is the use of the type information in the serialized xml

2010-03-09 Thread deepak
hi, i had a general question, what is the use of the type information in the serialized xml? ?xml version=1.0 encoding=UTF-8? posts type=array post/post post/post /posts what is the use of saying that posts is of type 'array', any use to ActiveRecord or ActiveResource? would it be useful in

[Rails] Re: Re: to get only the updated fields

2010-03-09 Thread Tom Mac
Hi I solved it as Michael suggested And it was working .But now i notified another issue. That is why reopening the thread. The issue is, even if the validations fail, mail is sent to user (What I need is only if update happens successfully on changed attributes then only mail to be sent)

Re: [Rails] Re: Re: to get only the updated fields

2010-03-09 Thread Michael Pavling
On 9 March 2010 08:31, Tom Mac li...@ruby-forum.com wrote: even if the validations fail, mail is sent to user (What I need is only if update happens successfully on changed attributes then only mail to be sent)    if changed? save      deliver_user_edit_details!    else      return

[Rails] Deprecations

2010-03-09 Thread Benoit Caccinolo
Hi all, Is there a way to have a list of all deprecated methods or classes in each new versions of Rails? I know that a warning is logged sometimes, but I would like a proper list to analyze the deprecated parts of my code before running it. Thanks, Benoit Caccinolo -- You received this

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

2010-03-09 Thread Veena Jose
Hai Nitin, I am again disturbing you.Your code is working fine for me.But i want something like this. 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] Authlogic and Aegis, current_user nil problem, Guest user

2010-03-09 Thread analogue40
Hi All, I have set up Authlogic and Aegis for role based authorization. Each time I check if a user has permission to do something, as it stands now I have to check 'current_user' isn't empty first, like this: % if current_user and current_user.may_do_something? % I'd like to change it so that

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

2010-03-09 Thread Veena Jose
Thank you so much I was stuck with some syntax error. Thanks Once Again Sincerely, Veena -- 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

Re: [Rails] Code Cleaning

2010-03-09 Thread Andy Jeffries
Agreed. I didn't notice that in the OP's code. Cheers, Andy -- Andy Jeffries http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS Company number: 5452840 On 9 March 2010 14:20, Peter Hickman peterhickman...@googlemail.com

Re: [Rails] Re: Career change: becoming RoR dev

2010-03-09 Thread Andy Jeffries
I feel you, I love teaching Taekwondo... Ooh.. Where do you teach? (I know, we're going off-topic!) I'm an assistant instructor at a club in Stevenage, Herts, UK. I used to have my own club for a few years, but now just help out/deputise. Understood :) And as far as the search for a

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

2010-03-09 Thread kannav rajeev
hi this is rajeev sharma working on ROR from last year . i have on year exp. in my project major types of my work is of bug re-movements and enhancements . i think i would be a good option for you skills i have : SVN for updates and commit updates Rails 2.3.5 mysql Apache sphinx HTML i could work

[Rails] Re: TIME PICKER HELP

2010-03-09 Thread Newb Newb
Is that not possible? -- 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

[Rails] Re: Re: Career change: becoming RoR dev

2010-03-09 Thread Aldric Giacomoni
Andy Jeffries wrote: I feel you, I love teaching Taekwondo... Ooh.. Where do you teach? (I know, we're going off-topic!) I'm an assistant instructor at a club in Stevenage, Herts, UK. I used to have my own club for a few years, but now just help out/deputise. Very nice :) Wish it

[Rails] TIME PICKER HELP

2010-03-09 Thread Newb Newb
I have installed time picker in my application using the below url. ruby script/plugin install http://timepicker.rubyforge.org/svn/trunk/ %=time_picker(Time.now, {:time_format = '12', :minute_step = 30})% when i use like above in my list.rhtml file , i get error like below undefined method

[Rails] Code Cleaning

2010-03-09 Thread Christophe
Hi there, I'm kind of a newbie on RoR and on this group and I was wondering if someone could help to clean this bit of code: %= link_to_remote (image_tag(hide.png, :size=16x16), :url=/message/#{message.id}/hide,

Re: [Rails] Re: making a generic comment model

2010-03-09 Thread Rick DeNatale
On Mon, Mar 8, 2010 at 10:20 PM, eggie5 egg...@gmail.com wrote: thanks you! polymorphic association it's called you say. It works now. You might want to have a look at the acts_as_commentable plugin http://github.com/jackdempsey/acts_as_commentable It expands on this idea, but uses

[Rails] Re: :joins help

2010-03-09 Thread Newb Newb
Thanks for the reply... after only associating i got the associated table fields. kindly look the below code @policy_logs = PolicyLog.find(:all, :joins = join policy_logs_receiver as plr on policy_logs.id = plr.policy_logs_id) -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: :joins help

2010-03-09 Thread Frederick Cheung
On Mar 9, 11:13 am, Newb Newb li...@ruby-forum.com wrote: Does Using :joins = requires association between the tables line belongs_to ,hasmany like that ? only if you want to use the shorthand form ( eg Person.find :all, :join = :orders) Fred -- You received this message because you

[Rails] RESTful photo album

2010-03-09 Thread DmitryPush
Hi, all! I'm new in Rails. I've read Agile web development and now I want made my very first rails application - photo album. But I don't know how to design it RESTful. For example I have 3 chapters and 100 photos on each one and i want list only 10 photos on page. How should look request for

[Rails] help on deployemnt

2010-03-09 Thread M I R
Look at this hmis.w3whizz.com this is my server for rail and i think its ok, i upload all my files from my local machine but it only display the homepage and any other url is not accessible like hmis.w3whizz.com/emr_visits please somebody give me some solution i am tired trying from last 3 days.

Re: [Rails] Code Cleaning

2010-03-09 Thread Andy Jeffries
I'm kind of a newbie on RoR and on this group and I was wondering if someone could help to clean this bit of code: How about something as simple as: % for image_filename in [hide.png, top.png, bottom.png] % %= link_to_remote (image_tag(image_filename, :size=16x16),

[Rails] periodically_call_remote doesn´t work prope rly

2010-03-09 Thread Guille San
Hi everyone: I have some problems using periodically_call_remote, here is my code: %=periodically_call_remote(:url = 'http://localhost:3000', :frequency = '0.5', :update = {:success='imagen'})% div id=imagen %=image_tag(/guarrada/Debug/foto.jpg) % /div My problem is that when I load the web

Re: [Rails] Code Cleaning

2010-03-09 Thread Peter Hickman
Only thing to note it that the :url parameter changes on each line (it does not always end with 'hide'!) The fact that it is the same as the image name should be treated as an unfortunate coincidence. The christophe_link_action() method should take two parameters, one for the image file name and

[Rails] How to hide an object???

2010-03-09 Thread Guille San
Hi everyone: I want to hide an object before it load. I see in the API the function page.hide but I don´t have any idea about how to use it properly. Anyone can help me?? Is there any other form to do that?? THANKs -- Posted via http://www.ruby-forum.com/. -- You received this message because

Re: [Rails] Re: Plugin for uploading a folder of images?

2010-03-09 Thread Peter De Berdt
On 09 Mar 2010, at 14:20, Max Williams wrote: Thanks Peter. I did try googling but didn't see anything leap out at me, that's why i asked for recommendations. I'll check SWFupload out. Happy for any other suggestions :) If you use SWFupload and Rails with Rack Middleware (more recent

[Rails] Re: Career change: becoming RoR dev

2010-03-09 Thread Aldric Giacomoni
Andy Jeffries wrote: So, just to ensure I'm clear - are you asking for shortcuts to be able to get you straight in to a senior position - or just after hints to improve so you may take a non-senior position and work up to it? Well, if you happen to know black magic, I'll buy a shortcut

[Rails] Re: Re: Plugin for uploading a folder of images?

2010-03-09 Thread Max Williams
i'll bear that in mind, 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send

[Rails] desired: webdav

2010-03-09 Thread tom
hi does anyone know / use / etc of a current webdav implementation / library? thx tom -- 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,

[Rails] Ruby 1.9 and Searchlogic problem

2010-03-09 Thread Dries Steenhouwer
Hello, After updating our Rails app to ruby 1.9 there are some problems with searchlogic, here you can find the error : Error : wrong number of arguments (1 for 0) Full trace ( passenger ) : /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:92:in `call'

[Rails] Career change: becoming RoR dev

2010-03-09 Thread Aldric Giacomoni
Hi all, I'm 27 and worked in the sysadmin field for about five years now. I've been using Ruby to help me for the past two-three years, and I started with Ruby on Rails, albeit slowly, over a year ago. I'd like to make the switch to becoming a full-time Rails dev, but I can't devote much free

Re: [Rails] Plugin for uploading a folder of images?

2010-03-09 Thread Peter De Berdt
On 09 Mar 2010, at 11:53, Max Williams wrote: Hi - can anyone recommend a plugin/gem for uploading a bunch of image files at once, and converting them to attachments? Ideally one that lets you select a folder and then uploads all of the images in that folder? Google rails multiple upload.

Re: [Rails] Code Cleaning

2010-03-09 Thread Christophe Decaux
Thanks, This is good concise explanation. I do have the book you suggests, but haven't had the time to go deep enough in it. Furthermore, I went back to it to check what it says about helper creation, but didn't quite understood Cheers, Christophe Le 9 mars 2010 à 15:08, Andy Jeffries a écrit :

Re: [Rails] Code Cleaning

2010-03-09 Thread Christophe Decaux
Thanks, That's a good start. Any advice where to start looking for how to make a helper method ? I'm kind of a newbie on RoR and on this group and I was wondering if someone could help to clean this bit of code: How about something as simple as: % for image_filename in [hide.png,

[Rails] Fast growing startup looking for a Senior Stud Rails Developer in India

2010-03-09 Thread Madhan
Do you have what it takes to be part of a Startup where only the best succeeds? Then this job is for you. Chronus Corporation is looking for energetic and dedicated individuals with a passion for software development, excellent programming skills and strong belief in product usability and

Re: [Rails] Career change: becoming RoR dev

2010-03-09 Thread Andy Jeffries
I'd like to make the switch to becoming a full-time Rails dev, but I can't devote much free time to developing the skills and experience required to comfortably say Take me for a Senior position. So, just to ensure I'm clear - are you asking for shortcuts to be able to get you straight in to

Re: [Rails] Re: Re: Career change: becoming RoR dev

2010-03-09 Thread Peter Hickman
Given your sys admin skills you could join a small company and be a sysadmin / developer and use that to get you skills then either become full time developer or move on with a CV that says developer. I seem to be going the other way :) -- You received this message because you are subscribed to

[Rails] Redirect to the url after login

2010-03-09 Thread Tushar Gandhi
Hi, I am using authlogic as a authentication mechanism. I am sending out an email to user if he has any new friend request. I am giving a URL in the email from which he can accept the invitation. My problem is whenever the user is not logged in he is redirected to the login page first. After

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

2010-03-09 Thread Colin Law
On 9 March 2010 10:59, Veena Jose li...@ruby-forum.com wrote: Hai Nitin,    You have helped me a lot.. Can you please suggest me some good books or links where a newbie like me can understand Ruby on rails much better Try the Rails Guides at http://guides.rubyonrails.org/ Colin --

[Rails] Re: Fml status report (ruby-talk ML)

2010-03-09 Thread shree jayendra
unsubscribe On Tue, Mar 9, 2010 at 5:47 PM, ruby-talk-ad...@ruby-lang.org wrote: your mail has no effective commands please read the following help and send requests to ruby-talk-...@ruby-lang.org HELP FILE of ruby-t...@ruby-lang.org ML - Index - 1 FYI: Brief

[Rails] Re: Re: :joins help

2010-03-09 Thread Newb Newb
Does Using :joins = requires association between the tables line belongs_to ,hasmany like that ? -- 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] Plugin for uploading a folder of images?

2010-03-09 Thread Max Williams
Hi - can anyone recommend a plugin/gem for uploading a bunch of image files at once, and converting them to attachments? Ideally one that lets you select a folder and then uploads all of the images in that folder? thanks, max -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: Plugin for uploading a folder of images?

2010-03-09 Thread Max Williams
Thanks Peter. I did try googling but didn't see anything leap out at me, that's why i asked for recommendations. I'll check SWFupload out. Happy for any other suggestions :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] acts as list and passenger

2010-03-09 Thread Krzysztof Kotlarek
Hello, i have problem with acts_as_list plugin. Everything works fine on development server, but it doesn`t work on production (passenger) . I set RailsSpawnMethod to conservative but it doesn`t help Thanks for your help -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] pdf-stamper

2010-03-09 Thread John Wu
Hi, I have installed both pdf-stamper and rjb on my machine, and when I tired the following code in my controller code pdf = PDF::Stamper.new(YellowReq.pdf) I got an error uninitialized constant HomeController::PDF I have set up java home export JAVA_HOME = '/Library/Java/Home' How to set up

[Rails] Re: Noob issue with virtual attributes

2010-03-09 Thread Greg Ma
Frederick Cheung wrote: If you have a has_many you can do tips.build(...) but with belongs_to and has_one you need to call build_tip instead Fred Thanks Fred, it works better now. But an have another issue. Now the data are stored in the database but the column city_it in the table tips is

[Rails] Re: Automating CSS in a plugin

2010-03-09 Thread John Lane
Would anyone be able to help with my query? -- 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,

Re: [Rails] Re: Re: Career change: becoming RoR dev

2010-03-09 Thread Jeremy Chase
I have to agree here; your strongest skill is one that is often lacking in Rails developers. You should be building an online 'portfolio', but if I were you, I'd focus on deployment and testing for value add to companies. -- Jeremy Chase http://twitter.com/jeremychase On Tue, Mar 9, 2010 at

[Rails] [JOBS] Ruby On Rails Developer

2010-03-09 Thread Dominika
RUBY ON RAILS DEVELOPER: BIBLIOCOMMONS The Position: We are seeking an experienced and passionate Ruby developer who will be a major contributor to our innovative social discovery platform for libraries. The Ideal Candidate: * Is most comfortable in a flexible, collaborative environment *

[Rails] undefined method `accepts_nested_attributes_for' for #Class:

2010-03-09 Thread sleepwalker
Sorry for the newb question, but it is: going through first steps I fond this exception. Have no idea, my rails version is 2.3.5 -- 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: RESTful photo album

2010-03-09 Thread Ar Chron
DmitryPush wrote: Hi, all! I'm new in Rails. I've read Agile web development and now I want made my very first rails application - photo album. But I don't know how to design it RESTful. For example I have 3 chapters and 100 photos on each one and i want list only 10 photos on page.

[Rails] Re: Redirect to the url after login

2010-03-09 Thread Ar Chron
Tushar Gandhi wrote: Hi, I am using authlogic as a authentication mechanism. I am sending out an email to user if he has any new friend request. I am giving a URL in the email from which he can accept the invitation. My problem is whenever the user is not logged in he is redirected to the

[Rails] Re: Code Cleaning

2010-03-09 Thread Marnen Laibow-Koser
Christophe wrote: Hi there, I'm kind of a newbie on RoR and on this group and I was wondering if someone could help to clean this bit of code: %= link_to_remote (image_tag(hide.png, :size=16x16), :url=/message/#{message.id}/hide, :method=post,

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

2010-03-09 Thread anton effendi
Please open www.kiranatama.com or www.wgs.co.id On Tue, Mar 9, 2010 at 3:32 AM, Blue Dog jos...@joshuadean.com wrote: 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

[Rails] Re: Efficiently building collections of nested sets

2010-03-09 Thread Marnen Laibow-Koser
DGerton wrote: This is question deals with the common example where Category has_many Products. (We'll use Species instead of Products here.) Assume Category is a nested class. Let's use this as the example: [Categories] Animals (id 1, parent_id=nil) -Mammals (id 2, parent_id=1)

[Rails] Re: Re: form_for, submit, and parameters disappearing

2010-03-09 Thread Marnen Laibow-Koser
Ralph Shnelvar wrote: Colin Law wrote: I think maybe you cannot include query terms in form_for :url. An alternative is to use hidden fields in the form. Colin, thank you. You appear to be correct. So for the next poor person fighting to get internationalization to work (I18n. See

[Rails] Re: where to put helper fns for fixtures?

2010-03-09 Thread Marnen Laibow-Koser
Fearless Fool wrote: I'm writing a fixture in test/fixtures/parrots_model.yml, and I'm happily using ERB to flesh out my fixture. Suddenly, I realize that I need a helper function to call from my erb code, such as: polly: subtype: parakeet weight_kg: %= ounces_to_kg(22.3) % alex:

[Rails] Re: noob question on associated records and their controller

2010-03-09 Thread Marnen Laibow-Koser
Grary wrote: 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

[Rails] Re: noob question on associated records and their controller

2010-03-09 Thread Marnen Laibow-Koser
Grary wrote: 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

Re: [Rails] Re: noob question on associated records and their controller

2010-03-09 Thread Jeremy Chase
You should just be able to do child.parent -- Jeremy Chase http://twitter.com/jeremychase On Tue, Mar 9, 2010 at 12:51 PM, Marnen Laibow-Koser li...@ruby-forum.comwrote: Grary wrote: Hi, I have controllers for two models between which there exists a belongs_to/has_one relationship.

[Rails] Ajax-submit form on check box onclick : why this error?

2010-03-09 Thread Tom Ha
Hi there, I need to have a checkbox which ajax-submits a form. The following code throws an error index 112009 out of string. What's wrong here? == % form_remote_tag :url = { whatever_url } do -% %= check_box_tag 'whatever', nil, whatever, { :onclick

Re: [Rails] Ajax-submit form on check box onclick : why this error?

2010-03-09 Thread anton effendi
I think... Dont use #{} %= check_box_tag 'whatever', nil, whatever, { :onclick = remote_function('this.form. submit();'), :disabled = false } % But I dont because i never try it... keep trying On Wed, Mar 10, 2010 at 1:02 AM, Tom Ha li...@ruby-forum.com wrote: Hi there, I need to

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

2010-03-09 Thread Nitin Rajora
Veena, I would suggest going through http://railscasts.com ..from episode 1st till the end... and keep watching the newer episodes. Ryan Bates is one of the best Rails Gurus there are Happy Women's Day, Nitin. On Tue, Mar 9, 2010 at 4:29 PM, Veena Jose li...@ruby-forum.com wrote: Hai

[Rails] Re: Ajax-submit form on check box onclick : why this error?

2010-03-09 Thread Tom Ha
Thanks for your answer. Unfortunately, if I try... :onclick = remote_function('this.form.submit();') ...then I get an error (by Firebug): remote_function is not defined Any other ideas? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] How can I check my current version of rails?

2010-03-09 Thread Muhammad mohsin ali Ma
How can I check my current version of rails? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group,

[Rails] local variable

2010-03-09 Thread kevid
Hi all, Please, is it possible passing a local variable (specifically of type integer) from a view to controller using the link_to function in rails. All answers are appreciated. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

Re: [Rails] help on deployemnt

2010-03-09 Thread Hassan Schroeder
On Tue, Mar 9, 2010 at 4:59 AM, M I R m.irfa...@gmail.com wrote: Look at this hmis.w3whizz.com this is my server for rail and i think its ok, i upload all my files from my local machine but it only display the homepage and any other url is not accessible like hmis.w3whizz.com/emr_visits

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

2010-03-09 Thread shyam mohan
Hi Blue View my profile and resume http://sites.google.com/site/shyammohankanojia/cv Regards, Shyam +91-9716-18-9650 On Tue, Mar 9, 2010 at 11:10 PM, anton effendi wuyoud...@gmail.com wrote: Please open www.kiranatama.com or www.wgs.co.id On Tue, Mar 9, 2010 at 3:32 AM, Blue Dog

Re: [Rails] local variable

2010-03-09 Thread Hassan Schroeder
On Tue, Mar 9, 2010 at 10:22 AM, kevid alumsimport...@yahoo.ca wrote: Please, is it possible passing a local variable (specifically of type integer) from a view to controller using the link_to function in rails. All answers are appreciated. Have you read the API doc for link_to ? Your

[Rails] Re: local variable

2010-03-09 Thread kevid
thanks, pls can you post the link? On Mar 9, 7:30 pm, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Tue, Mar 9, 2010 at 10:22 AM, kevid alumsimport...@yahoo.ca wrote: Please, is it possible passing a local variable (specifically of type integer) from a view to controller using the

[Rails] Re: How can I check my current version of rails?

2010-03-09 Thread Ugis Ozols
Type in terminal: rails -v On Mar 9, 8:19 pm, Muhammad mohsin ali Ma li...@ruby-forum.com wrote: How can I check my current version of rails? -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

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

2010-03-09 Thread doug
Try this: File.open(File.join(params[:upload_directory], params[:file2upload].original_filename),'wb'){ |f|   f.write(params[:file2upload].read) } Yes; but, as I understand your suggestion, that would require me to pass the original filename as a parameter. What I'm trying to find out is

[Rails] Retain Form Values on reset

2010-03-09 Thread Ashwin Vel
I have a Login page created with 4 fields and a submit button for an application i am developing. Username : Email address : Password : Confirm Password : i am validating each field. so if the username is missing , when u hit submit button , there is a notice / warning that flashes on top So if

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

2010-03-09 Thread Jamey Cribbs
That's what I'm trying to tell you. If you are using a multipart form to upload your file, then the #original_filename attribute should be available on the uploaded file object. Jamey On Tue, Mar 9, 2010 at 1:46 PM, doug ddjol...@gmail.com wrote: Try this:

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

2010-03-09 Thread doug
That's what I'm trying to tell you.  If you are using a multipart form to upload your file, then the #original_filename attribute should be available on the uploaded file object. Got it! I'm an idiot! Thanks a batch. ... doug -- You received this message because you are

[Rails] Re: local variable

2010-03-09 Thread Robert Walker
kevid wrote: pls can you post the link? http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M001597 Please, is it possible passing a local variable (specifically of type integer) from a view to controller using the link_to function Although, this is not passing a local

Re: [Rails] Retain Form Values on reset

2010-03-09 Thread David Cuddeback
Ashwin, I had to do something similar in my app. What you can do is create an object that mimics ActiveRecord in your controller. By that, I mean the object should have methods with the same names as the attributes which return the attribute's value. Then pass that to a form helper, and you

[Rails] db:migrate fails after upgrade to Rails 2.3.5

2010-03-09 Thread Kurt
Hi -- I'm upgrading an app from Rails 2.0.2 to 2.3.5 in development on a Mac OS/X Leopard. I unfroze the old Rails files, froze the 2.3.5 gem on the machine into the app, and some quick tests of the app showed no problems. However, after trying to run rake db:migrate, it fails silently. Run

[Rails] EAV Model vs Rails

2010-03-09 Thread Sumeet Panchal
Hi, I have a relational database (MySQL) with 200 tables in it. Now I want to reduce number of tables (If it helps in improving the application). One approach is to use EAV database model. In which we can use a table to store ID and manadatory details and other table to store rest of the details

[Rails] Re: db:migrate fails after upgrade to Rails 2.3.5

2010-03-09 Thread Frederick Cheung
On Mar 9, 5:53 pm, Kurt k...@cissor.com wrote: Hi -- I'm upgrading an app from Rails 2.0.2 to 2.3.5 in development on a Mac OS/X Leopard.  I unfroze the old Rails files, froze the 2.3.5 gem on the machine into the app, and some quick tests of the app showed no problems. did you run rake

[Rails] Filter access to static content

2010-03-09 Thread Geoffroy Gomet
How can I filter access to static content (images, movies, pdf, ...). I'm familiar with filtering access to parts of a website, but how can I manage to filter access to static files (uploaded images,...)? Greetz Geoffroy -- You received this message because you are subscribed to the Google

[Rails] undefined method join for STRING error

2010-03-09 Thread John Merlino
Hey all, I was converting a haml file to erb and when finished, I ran the app and got this error message: NoMethodError in Students#student_fail Showing app/views/students/student_fail.erb where line #40 raised: undefined method `join' for #String:0x105a5e0c8 Extracted source (around line

[Rails] Re: Filter access to static content

2010-03-09 Thread Robert Walker
Geoffroy Gomet wrote: How can I filter access to static content (images, movies, pdf, ...). I'm familiar with filtering access to parts of a website, but how can I manage to filter access to static files (uploaded images,...)? Apache configuration or .htaccess file? This isn't really relative

[Rails] Re: Automating CSS in a plugin

2010-03-09 Thread Fernando Perez
John Lane wrote: Would anyone be able to help with my query? I'd say monkey patch the view helpers to inject your own code (css, js, whatever) in it. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: How to hide an object???

2010-03-09 Thread Robert Walker
Guille San wrote: Hi everyone: I want to hide an object before it load. I see in the API the function page.hide but I don´t have any idea about how to use it properly. Anyone can help me?? Is there any other form to do that?? By object I assume you mean HTML element. div id='my_element'

[Rails] Re: RESTful photo album

2010-03-09 Thread Robert Walker
DmitryPush wrote: site.my/chapter/2/4 It is my opinion that people often go overboard with the REST concepts. As far as I'm concerned there's nothing non-RESTful about: http://host/chapter/2/photos?page=4per_page=10 The URL still identifies the resource, which would be the collection of

Re: [Rails] pdf-stamper

2010-03-09 Thread Craig White
On Tue, 2010-03-09 at 16:58 +0100, John Wu wrote: Hi, I have installed both pdf-stamper and rjb on my machine, and when I tired the following code in my controller code pdf = PDF::Stamper.new(YellowReq.pdf) I got an error uninitialized constant HomeController::PDF same error as

Re: [Rails] Re: RESTful photo album

2010-03-09 Thread Greg Donald
On Tue, Mar 9, 2010 at 3:59 PM, Robert Walker li...@ruby-forum.com wrote: As far as I'm concerned there's nothing non-RESTful about: http://host/chapter/2/photos?page=4per_page=10 I agree, but all the question marks and ampersands pretty much guarantee Google won't index it. -- Greg Donald

[Rails] Re: undefined method join for STRING error

2010-03-09 Thread John Merlino
John Merlino wrote: Hey all, I was converting a haml file to erb and when finished, I ran the app and got this error message: NoMethodError in Students#student_fail Showing app/views/students/student_fail.erb where line #40 raised: undefined method `join' for #String:0x105a5e0c8

[Rails] Re: Filter access to static content

2010-03-09 Thread Geoffroy Gomet
That's just what I'm asking, how to let Rails handle some static content. An example of what I mean : Someone upload a picture he wants to be the only one to see even if someone else know the url of the picture. Should there be a controller dedicated to filter and return the pictures (with

[Rails] Re: Re: RESTful photo album

2010-03-09 Thread Robert Walker
Greg Donald wrote: On Tue, Mar 9, 2010 at 3:59 PM, Robert Walker li...@ruby-forum.com wrote: As far as I'm concerned there's nothing non-RESTful about: http://host/chapter/2/photos?page=4per_page=10 I agree, but all the question marks and ampersands pretty much guarantee Google won't

[Rails] Making Rails interract with external sites / JS processing

2010-03-09 Thread Chris Dekker
For some hobby project of mine I am trying to come up with a way to let a Rails application interact with some external website. I am trying to achieve the following. Lets for example take a banner on a website. Which is the easiest to explain. Banners usually are on the same spot on websites,

[Rails] A Unique Ruby on Rails Opportunity

2010-03-09 Thread Priyanka Dayalan
Passionate Java Developer / Ruby on Rails/ Agile Environment (Perm position) Top $$$ on offer Central Location Fun and Challenging role We are looking for a strong, passionate developer, specializing in Java Development to join a dynamic, fun, energetic team. You will need to have strong ruby

[Rails] Re: Ruby 1.9 and Searchlogic problem

2010-03-09 Thread Dries Steenhouwer
Somebody who can help me? -- 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

[Rails] Variable Scope Within a controller

2010-03-09 Thread Ashwin Vel
I have a controller for registering an user. i am not able to use the instance variable @username in Process. How do i use them ? and also is it safe to declare usernames and passwords as global variables. I am pretty new to ruby on rails. any help would be great. class RegisterController

[Rails] Re: Variable Scope Within a controller

2010-03-09 Thread Frederick Cheung
On Mar 9, 11:40 pm, Ashwin Vel velapa...@gmail.com wrote: I have a controller for registering an user. i am not able to use the instance variable @username in Process. How do i use them ? and also is it safe to declare usernames and passwords as global variables. While process and register

[Rails] Re: Variable Scope Within a controller

2010-03-09 Thread Ashwin Vel
I am not currently using database for my application, i am getting the data from forms, and calling a register api [ register(username,pwd,email) ]. The only reason i want the username and pwd for process is cause my registration page is a 2 step process. and for each step i have defined an

[Rails] Re: where to put helper fns for fixtures?

2010-03-09 Thread Fearless Fool
Marnen Laibow-Koser wrote: ...snip... Where's the right place to stash the ounces_to_kg() function so that it's available when I rake db:load:fixtures? Nowhere, because IMHO it's never right to use Rails fixtures. Use factories instead -- I'm fond of Machinist, but there are other

[Rails] discriminating two FK references into one table?

2010-03-09 Thread Fearless Fool
My question MIGHT be ActiveRecord play nice with multiple views into a table? I ask because my application has a single DateDimension table (heavily ornamented date objects). Each SalesFact has TWO foreign keys into the DateDimension table: one for the date a house went on the market, one for

[Rails] must be nil validation?

2010-03-09 Thread Seirie
Hey guys, is there a validation that essentially acts the opposite way of validates_presence_of. That is, the attribute in question must be nil, or blank, non-existent. If not, what's the best way to prevent a user from altering a web form attempting to submit data to a field that they should

[Rails] [ANN] loofah 0.4.7 Released

2010-03-09 Thread Mike Dalessio
loofah version 0.4.7 has been released! * http://github.com/flavorjones/loofah * http://loofah.rubyforge.org * http://rubyforge.org/projects/loofah Loofah is a general library for manipulating and transforming HTML/XML documents and fragments. It's built on top of Nokogiri and libxml2, so it's

[Rails] Rails ActiveRecord associations autosave option

2010-03-09 Thread ash 34
I have the following associations. class Document ActiveRecord::Base has_many :document_sections, :dependent = :destroy, :autosave = true has_many :document_items, :through = :document_sections end class DocumentSection ActiveRecord::Base belongs_to :document has_many :document_items,

  1   2   >