[Rails] Re: edit a model and its has_many children at once?

2009-10-14 Thread Sahil Dave
Try the new "accepts_nested_attributes_for" feature in rails 2.3 http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes On Oct 14, 8:14 pm, Chris Morris wrote: > I know there has to be a way to do this.  Is there any way to edit a > model, and its has_many children in

[Rails] Announcement: new sanitization plugin acts_as_sanitiled

2009-10-14 Thread dasil003
I just finished cooking up a version of acts_as_textiled that will sanitize after the RedCloth operation to guarantee well-formedness and XSS safety. I chose this approach over input-filtering like xss_terminate does because I don't like to munge the user input, and I didn't want to have to add a

[Rails] Re: Model.Save causing nil object error

2009-10-14 Thread Sijo kg
Hi Matthew Shapiro I think you are trying for uniq entry in join table(here relationship_topics).That you can do on db level In the migration file for this join table you can add after the creation of the table an index like add_index :relationship_topics, [:relationship_id, :topic_id],

[Rails] Re: attr_accessor :password

2009-10-14 Thread Ralu rm
Conrad Taylor wrote: > On Wed, Oct 14, 2009 at 4:19 AM, Ralu rm > wrote: > >> >> >> validates_presence_of :username >> :password_required? >> end >> end >> >> > 'attr_accessor :password' will generate two instance methods for class > User > similar > to the following: > > def password=(val)

[Rails] Re: fields_for weirdness

2009-10-14 Thread Charles
of course.. i post here and then I get it . I started getting angry and thrashing and put the @newsletter.sections.build in the wrong method. once i moved it, everything started working just fine. thanks, C. On Oct 15, 12:13 am, Charles wrote: > I just did a large upgrade to to Rails 2.3.4  a

[Rails] fields_for weirdness

2009-10-14 Thread Charles
I just did a large upgrade to to Rails 2.3.4 and I am trying to make use of the more modern view features. I have a Newsletter object. Newsletter has many Sections. I also have: accepts_nested_attributes_for :sections on the Newsletter object. I have the typical scaffolded new.html.erb with

[Rails] Re: il.add_index question

2009-10-14 Thread Stephen Burke
Yeah that's true, thanks. Steve On Tue, Oct 13, 2009 at 9:17 AM, Marnen Laibow-Koser < rails-mailing-l...@andreas-s.net> wrote: > > Colin Law wrote: > > 2009/10/13 steveb56 : > >> add_index(:friendships, [:friend_id1, :friend_id2], :unique => true) > >> > >> I would also like to add an index to

[Rails] Model.Save causing nil object error

2009-10-14 Thread Matthew Shapiro
Hello all. Newbie to rails here and I am having a bit of an issue. I have the following models: class Topic < ActiveRecord::Base validates_presence_of :name validates_length_of :name, :minimum => 3 has_many :relationship_topics has_many :relationships, :through => :relationship_topics e

[Rails] Select Option Broken on Eager Load With 2nd Order Association

2009-10-14 Thread MaggotChild
I only want to select certain columns when eager loading an association: class Package < ActiveRecord::Base has_many :deliveries, :select=>'id, name, region_id, package_id', #exclude text column dont_select_me :include=>:region end class Delivery < ActiveRecord::Base bel

[Rails] Re: PLZ HELP - ROR on Redhat Linux :: Problem with backgroun

2009-10-14 Thread Sapna Ruby
PLS HELP ME TO SOLVE THIS ISSUE -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegr

[Rails] Re: rails security help

2009-10-14 Thread Gaspard Bucher
Marli Ba wrote: > Hey I was wondering if anyone knows of a gem or plugin that can limit > fields returned based on the User's role? I'm looking for something > that will basically rewrite the find() method to limit the fields > returned based on the User role. > > so, > > Admin: > Product.all =

[Rails] PLZ HELP - ROR on Redhat Linux :: Problem with backgroundrb

2009-10-14 Thread Sapna Ruby
Hi, I have successfully crossed all the hurdles to install Ruby on rails on a redhat 5 Linux based system. But the last and the biggest hurdle i am facing at this moment is installing backgrounrb :( I followed all the steps from the http://backgroundrb.rubyforge.org/ 1. sudo gem install chron

[Rails] Re: Saving and updating multiple objects

2009-10-14 Thread Jeremy Woertink
Solved it! Thanks to a good friend :) For those who have similar issues, look into the accepts_nested_attributes_for :your_object it works wonders! class Person < ActiveRecord::Base has_many :projects accepts_nested_attributes_for :projects end <% form_for @person, :url => { :act

[Rails] Re: Saving and updating multiple objects

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 3:51 PM, Jeremy Woertink < rails-mailing-l...@andreas-s.net> wrote: > > Ok, I'm thinking it might have something to do with the checkboxes. If I > place a number into the text_field, and update, then everything seems > ok. If I check a box, then that's when it gets all weir

[Rails] zena first gem: need testing

2009-10-14 Thread Gaspard Bucher
Hi List ! Zena is reaching maturity and we are in the process to deliver the CMS as a gem for the first time. Before pushing the gem in the wild, it would be really nice if some people could test the thing and give me some feedback... download page with instructions: http://bit.ly/31nW1l Gaspa

[Rails] Re: Saving and updating multiple objects

2009-10-14 Thread Jeremy Woertink
Ok, I'm thinking it might have something to do with the checkboxes. If I place a number into the text_field, and update, then everything seems ok. If I check a box, then that's when it gets all weird. Anyone see something that I'm not? -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Re: Saving and updating multiple objects

2009-10-14 Thread Jeremy Woertink
small correction in the controller code, I know the @menu.update_attributes!(params[:menu]) was commented out. That was from some testing, I just forgot to uncomment before posting. Sorry, ~Jeremy -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~

[Rails] Saving and updating multiple objects

2009-10-14 Thread Jeremy Woertink
Hi All. First to start, please bare with me as I'm really confused on all this and have been stuck for about a day now, so I'm not sure if I will even be asking the right questions or not, but here goes. I'm trying to create a Menu object and then assign a group of Day objects to it. This part i

[Rails] Re: plugin or web service for printing UPS shipping labels

2009-10-14 Thread Sergio Sergio
Hello all, I haven't found a rails plugin for this, but I found a dcoument in UPS, go to this page http://www.ups.com/e_comm_access/tracking?loc=en_USgo to Get Tools, and in the premium tools choose UPS Shipping, there is a document and it has everything you need, hope it help you... 2009/10/13 S

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 9:07 AM, Jez wrote: > > There's nothing currently in my path profile file (that is what you > all mean?) I removed it at Conrads request. > > as per hivelogic it was previously > export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin: > $PATH" > > Your PATH shoul

[Rails] Re: Tags or Full text tagging ?

2009-10-14 Thread Philip Hallstrom
On Oct 14, 2009, at 1:10 PM, Ale Ds wrote: > > Hi everyone, > I am developing a web apps, > and I have to chose which method is better (for me): Tags or Full text > tagging ? > > Usually when a user inserts a certain text content, he have to tags > it, > so other users can retrive the content.

[Rails] Re: Will the sky fall down if I install Ruby on Rails?

2009-10-14 Thread Norm Scherer
omar.m wrote: ... Also: I have Windows machines Can my code be transferred with no alterations to my Linux server? Thanks Omar You can transfer RoR applications from a windows system (that has RoR installed) to a Linux system (that has the same version of RoR installed) with no probl

[Rails] Re: ActiveRecord failing with a default field value of blank

2009-10-14 Thread Frederick Cheung
On Oct 14, 1:09 am, Duane Morin wrote: > It appears that there was a mysql upgrade (5.0.45 to 5.0.77) on the day > in question, but IT tells me no rails or gem updates.  But it doesn't > seem like a mysql thing, as the insert statements would be generated on > the Ruby side? > I think this was a

[Rails] Tags or Full text tagging ?

2009-10-14 Thread Ale Ds
Hi everyone, I am developing a web apps, and I have to chose which method is better (for me): Tags or Full text tagging ? Usually when a user inserts a certain text content, he have to tags it, so other users can retrive the content. Inserting tags it a boring works for users, then I am locking

[Rails] Re: Conditional layout - show

2009-10-14 Thread Colin Law
2009/10/14 John Mcleod : > > I apologize to all for being unclear. It's just the newbie coming out. > Let's try again. > > I have a 'projects' layout within the 'Views' folder, with a heading, > nav bar, and content area. Is that literally a layout, ie views/layouts/projects.html.erb? > When you

[Rails] Re: sybase in rails2?

2009-10-14 Thread Aldric Giacomoni
Jonathan Rochkind wrote: > Ha! I just got it to work! > > I had some cruft in ~/.gem. Deleted all that, finally it SEEMS to be > working. Or at least I'm on to a new level. I am hanging to the edge of my seat; like Tim Curry would say, shivering with antici... pation. Please let us know the n

[Rails] Re: sybase in rails2?

2009-10-14 Thread Jonathan Rochkind
Ha! I just got it to work! I had some cruft in ~/.gem. Deleted all that, finally it SEEMS to be working. Or at least I'm on to a new level. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[Rails] Re: Active Record associations performance

2009-10-14 Thread Ilan Berci
Anton Ivanov wrote: > Hi, > this (in class Project): > def copy(other_project) > other_project.issues.each do |other_issue| > self.issues << other_issue.copy > end > self.save > end > Not tested.. just thinking.. Get the link(associative) table that's used in the many to many associ

[Rails] Re: sybase in rails2?

2009-10-14 Thread Jonathan Rochkind
Okay, I figured out my problem with the help of "ruby -e 'puts $:'". I had a number of site_ruby directories that LOOKED legit, but weren't actually in the load path, who knows. But it's STILL not actually working. So, no, Aldric, I can't show you in a simple ruby program how I'm connecting, b

[Rails] Re: sybase in rails2?

2009-10-14 Thread Aldric Giacomoni
Jonathan Rochkind wrote: > > I moved them to /usr/lib/ruby/site_ruby/1.8/x86_64-linux/ bah, > still does not work. > > How very annoying. Alright; can you show me, in a simple ruby program, how you are connecting? Also, are you connecting to Sybase ASE? Did you do something like this: g

[Rails] mini_magick

2009-10-14 Thread doug
I have setup ImageMagick and mini_magick. Generally speaking, I'm impressed. The problem seems to be that, unless I've missed something, there is not a lot of documentation detailing the use of mini_magick. I've figured out that one can create an image object instance from a file with something

[Rails] Active Record associations performance

2009-10-14 Thread Anton Ivanov
Hi, I'm running into a memory performance issue with Active Record associations. I'm tinkering with Redmine, a rails-based project management application. The central model in the application is 'Project' which associates via has_many to model Issue. One of the things you can do with Projects i

[Rails] Re: sybase in rails2?

2009-10-14 Thread Jonathan Rochkind
Aldric Giacomoni wrote: > Mine are in C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt > You probably have some i686 or i386 or i686-gcc directory there, instead > of msvcrt. Awesome, thanks, I'm on unix (Red Hat Linux), but this gave me some ideas to translate to the analagous location. I had TRIE

[Rails] Re: Conditional layout - show

2009-10-14 Thread John Mcleod
I apologize to all for being unclear. It's just the newbie coming out. Let's try again. I have a 'projects' layout within the 'Views' folder, with a heading, nav bar, and content area. When you select "show" on the index.html.erb of the 'projects' View folder, the project information displays i

[Rails] Reinstantiate controller during functional testing

2009-10-14 Thread Patrick Doyle
... ok, I may be going about this the wrong way, or perhaps, a less efficient way than is optimal, but I would like to test a little bit of AJAX on one of my web pages. When I test this by hand, I bring up the page which shows a select box, I select an item from the drop down list, see another se

[Rails] Re: Test rails model with Cucumber?

2009-10-14 Thread Raimond Garcia
IMHO Cucumber is an excellent tool to use to on top of rspec to do unit testing. Dear Joshua, Doing unit tests with cucumber has not yet been approved as a best practice, but don't let that stop you from experimenting. Cucumber is no substitute for rspec , it's a complement, a way of writing

[Rails] Re: sybase in rails2?

2009-10-14 Thread Aldric Giacomoni
Jonathan Rochkind wrote: > I am not sure what that means. Can't figure out where to put those files > where a Rails app will find them, and << require 'sybsql' >> (a line in > the AR adapter) won't just say "no such file to load". > > Any ideas? Mine are in C:\ruby\lib\ruby\site_ruby\1.8\i386-

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Leonardo Mateo
On Wed, Oct 14, 2009 at 6:07 PM, Jez wrote: > > There's nothing currently in my path profile file (that is what you > all mean?) I removed it at Conrads request. > > as per hivelogic it was previously > export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin: > $PATH" > > Even without th

[Rails] Re: Conditional layout - show

2009-10-14 Thread Colin Law
2009/10/14 John Mcleod : > > Hello all, > I'm learning Ruby on Rails and still kind of new at this. > > I have two different layouts (standard page and dialog box) for a view > (show). It is inadvisable to use the word layout here as that word has a particular meaning in Rails. I take it that yo

[Rails] Re: Really need some help with production environment instal

2009-10-14 Thread Jez
Whoa, that'll be the path then /usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/ bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin On 14 Oct, 17:25, Marnen Laibow-Koser wrote: > Jez wrote: > > There's nothing currently in my path profile file (that is what you >

[Rails] Re: Really need some help with production environment instal

2009-10-14 Thread Marnen Laibow-Koser
Jez wrote: > There's nothing currently in my path profile file (that is what you > all mean?) I removed it at Conrads request. Not quite. I think the question being asked was about the PATH environment variable, which you can see by typing echo $PATH at the command line. If you didn't modify

[Rails] Re: sybase in rails2?

2009-10-14 Thread Jonathan Rochkind
Aldric Giacomoni wrote: > If I have time soon, which, sadly, is unlikely, I will try to get this > working on an Ubuntu machine. I believe you're right, and setting up > ctlib will help you out. Let me know what works, in the end, and I'll > put that on my blog as well - because you're right,

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Jez
There's nothing currently in my path profile file (that is what you all mean?) I removed it at Conrads request. as per hivelogic it was previously export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin: $PATH" Even without this i am receiving a similar error. If i understand correctly

[Rails] Re: sybase in rails2?

2009-10-14 Thread Aldric Giacomoni
Jonathan Rochkind wrote: > Yeah, that helped a little. > > The key is clearly that the AR sybase adapter depends not only on sybase > client libraries being installed, but also on the ruby sybase-ctlib > being installed. http://raa.ruby-lang.org/project/sybase-ctlib/ > > Kinda tricky to get th

[Rails] Re: Call an helper method from a controller

2009-10-14 Thread Thomas Gendulphe
You can also directly instanciate a Helper object and call a method. example with number_to_currency: Object.new.extend(ActionView::Helpers::NumberHelper).number_to_currency(number, options) but beware that is there are methods of other Helpers methods, they will fail. -- Posted via http://

[Rails] Re: sybase in rails2?

2009-10-14 Thread Jonathan Rochkind
Yeah, that helped a little. The key is clearly that the AR sybase adapter depends not only on sybase client libraries being installed, but also on the ruby sybase-ctlib being installed. http://raa.ruby-lang.org/project/sybase-ctlib/ Kinda tricky to get that installed, but at least I know what

[Rails] Re: Conditional layout - show

2009-10-14 Thread Robert Walker
Robert Walker wrote: > I would put the content of the page/dialog into a partial. I'm going to > assume that your dialog version will be rendered by an AJAX call. On second thought the partial may not be necessary. -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~

[Rails] Re: Conditional layout - show

2009-10-14 Thread Robert Walker
John Mcleod wrote: > I have two different layouts (standard page and dialog box) for a view > (show). > How do I set each layout in the controller to show the different layout? I don't know exactly what you're trying to accomplish from the information you provided, but this approach doesn't "fee

[Rails] Re: How to exit rails application from within

2009-10-14 Thread chris.reis...@gmail.com
On Oct 13, 11:56 am, Damjan Rems wrote: > pepe wrote: > > What do you mean by "restarting" the application? Do you mean end the > > session (if any) and (re)display the login/index/initial page? > > > If you need to end a session you can do it with this: > > > reset_session > > > To send a user

[Rails] Conditional layout - show

2009-10-14 Thread John Mcleod
Hello all, I'm learning Ruby on Rails and still kind of new at this. I have two different layouts (standard page and dialog box) for a view (show). How do I set each layout in the controller to show the different layout? Something like this... - Controller - def show @project = Project.find

[Rails] Re: sybase in rails2?

2009-10-14 Thread Aldric Giacomoni
Jonathan Rochkind wrote: > Has anyone actually gotten the activerecord-sybase-adapter to work in > Rails2? > I've never had to suffer through doing this in Linux, but I had to suffer through doing it in Windows. Maybe this can help you a little? http://trevoke.net/blog/2009/09/11/connecting-to-

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Leonardo Mateo
On Wed, Oct 14, 2009 at 4:16 PM, Eric wrote: > > J, > > Can you paste in exactly what is in your PATH now? That might help > clear up where the problem is. And yes, if you are following the > Hivelogic instructions for the Ruby/Rails/Gem install you will need > something in your PATH. > I don't

[Rails] edit a model and its has_many children at once?

2009-10-14 Thread Chris Morris
I know there has to be a way to do this. Is there any way to edit a model, and its has_many children in a single view? Example: class Metadata has_many :metadata_entries end If both Metadata and MetadataEntries have a 'label' attribute, what would the view look like? Here is my best guess, b

[Rails] sybase in rails2?

2009-10-14 Thread Jonathan Rochkind
Has anyone actually gotten the activerecord-sybase-adapter to work in Rails2? I can't seem to, and can't figure out why. I am on RedHat linux. I have the sybase client libraries installed, I have the adapter installed. After installing the patch at https://rails.lighthouseapp.com/projects/8994-r

[Rails] A question about submitting parameters using Ajax.Updater

2009-10-14 Thread C K Kashyap
Hi, How can I use Ajax.Updater to send parameters from HTML - param1 and param2 the values of which are not in a form as such using Ajax.Updater in a manner such that on the server side, I use the model's update_attributes method. new Ajax.Updater( '#{options[:update_html_

[Rails] Render partial with nested attributes in different model

2009-10-14 Thread Ryan Tinsley
Hi everyone, My previous question was posted here. I'm starting a new topic as the problems have shifted. I have a rails application that models a house. There is a house model that has_many rooms. A room has a

[Rails] Render partial with nested attributes in another model

2009-10-14 Thread Ryan Tinsley
Hi everyone, My previous question was posted here. I'm starting a new topic as the problems have shifted. I have a rails application that models a house. There is a house model that has_many rooms. A room has a

[Rails] Re: Site map

2009-10-14 Thread Rob Biedenharn
You'd put this code (really just the additional "sitemap.add" lines) into your config/sitemap.rb file. Are you sure that you installed the plugin? The SitemapGenerator should be defined by the vendor/plugins/sitemap_generator/lib/ sitemap_generator.rb file which Rails will autoload as needed

[Rails] rails security help

2009-10-14 Thread Marli Ba
Hey I was wondering if anyone knows of a gem or plugin that can limit fields returned based on the User's role? I'm looking for something that will basically rewrite the find() method to limit the fields returned based on the User role. so, Admin: Product.all => returns id, number, description,

[Rails] Re: Problem with onload

2009-10-14 Thread Marnen Laibow-Koser
Rafael Roque wrote: > Hi all, > Does someone know why the following code doesn´t work if it is embedded > in a partial?in a regular .rhtml file works well. > > > document.observe('dom:loaded', function() { > alert('testing'); > }); > I'm not sure on a quick look. But I do notice a couple

[Rails] Render partials with nested attributes in another model

2009-10-14 Thread Ryan Tinsley
Hi everyone, My previous question was posted here. I'm starting a new topic as the problems have shifted. I have a rails application that models a house. There is a house model that has_many rooms. A room has a

[Rails] Re: Really need some help with production environment instal

2009-10-14 Thread Marnen Laibow-Koser
Jez wrote: > Thanks Conrad I will have a go. > > I found myself pointed to the Hivelogic tutorials from most places ie > lynda.com & ADC. I'm not sure about the lynda.com stuff, but the ADC articles date from a time when Rails wasn't packaged with the OS (i.e., before Leopard). Since Leopard,

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Eric
J, Can you paste in exactly what is in your PATH now? That might help clear up where the problem is. And yes, if you are following the Hivelogic instructions for the Ruby/Rails/Gem install you will need something in your PATH. On Oct 14, 8:49 am, Jez wrote: > Hello again, > Ok ive removed that

[Rails] Combining rails intrAnet and public site.

2009-10-14 Thread nick ger
Hello, everyone! I was wondering if somebody has some insight on this issue. [h]A little background:[/h] I work for a midsize electronic manufacturing company with 2 people in IT dept - a network admin and a developer (me). We've been using rails to migrate from an old dBase and VB based system

[Rails] Re: How to exit rails application from within

2009-10-14 Thread pepe
I don't think you'll be able to do that. I am assuming that you mean the user being able to kill the application. Remember that the user will probably be removed from the server that runs Rails and he/she won't have access to it. That access is only available through the browser. The only way tha

[Rails] Re: Searching a model based on a filter on its association

2009-10-14 Thread Ar Chron
Sahil Dave wrote: > > I need to search users based on the age stored in the profile > I tried using the :joins option of find. but it seems it works only on > tables in the same db. > But of course. So search the Profiles, get your list of user_id's that match the criteria, then select the Us

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Jez
Hello again, Ok ive removed that from my path, and still get similar error $ sudo gem update --system Password: /usr/local/lib/ruby/1.8/thread.rb:5:in `require': no such file to load -- thread.so (LoadError) from /usr/local/lib/ruby/1.8/thread.rb:5 from /usr/local/lib/ruby/site_ru

[Rails] Re: Problem with onload

2009-10-14 Thread Colin Law
2009/10/14 Rafael Roque : > > Hi all, > Does someone know why the following code doesn´t work if it is embedded > in a partial?in a regular .rhtml file works well. > > >  document.observe('dom:loaded', function() { > alert('testing'); > }); >   Check the generated html in your browser if you hav

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Conrad Taylor
Hi, please remove the following from your path: /usr/local/bin /usr/local/sbin Then open a new shell and try the commands that I specify below. -Conrad On Wed, Oct 14, 2009 at 4:21 AM, Jez wrote: > > Ok so no joy there, still getting exact same messages > > sudo gem update --system > /usr/lo

[Rails] Re: how to implement get and post method in Ruby on Rails

2009-10-14 Thread Colin Law
2009/10/14 Yousef Jawwad : > > hi everybody > > I am trying to develop a simple Ruby on Rails application . > > what I want to know , how I can implement get and post method in Ruby on > Rails > > Have you had a look at the rails guides? Particularly Getting Started with Rails. You will see GE

[Rails] Re: attr_accessor :password

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 4:19 AM, Ralu rm wrote: > > Conrad Taylor wrote: > > On Wed, Oct 14, 2009 at 3:21 AM, Ralu rm > > wrote: > > > >> >> > >> > > >> > Where can one find this example? > >> > > >> > -Conrad > >> > >> i got dat from tutorial . for me the expalnation was not dat gud > >> so can a

[Rails] Problem with onload

2009-10-14 Thread Rafael Roque
Hi all, Does someone know why the following code doesn´t work if it is embedded in a partial?in a regular .rhtml file works well. document.observe('dom:loaded', function() { alert('testing'); }); -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~---

[Rails] Sophisticated routes recognition (with regexp, for instance). Is there any way?

2009-10-14 Thread Daniel Vartanov
Hi! Let's imagine we need to deal with such non-RESTful routes: /!some_value # note the '!' in the beginning /resource(value) == The first obvious way to do it in Rails is: map.first_example '/%21:value', :controller => map.second_example '/resource%28:value%29' (%21

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Jez
Ok so no joy there, still getting exact same messages sudo gem update --system /usr/local/lib/ruby/1.8/thread.rb:5:in `require': no such file to load -- thread.so (LoadError) from /usr/local/lib/ruby/1.8/thread.rb:5 from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:10:in `requir

[Rails] Re: attr_accessor :password

2009-10-14 Thread Ralu rm
Conrad Taylor wrote: > On Wed, Oct 14, 2009 at 3:21 AM, Ralu rm > wrote: > >> >> >> > >> > Where can one find this example? >> > >> > -Conrad >> >> i got dat from tutorial . for me the expalnation was not dat gud >> so can any one help me with dat >> > > Where's the complete class? require 'dig

[Rails] Re: Reg: deployment

2009-10-14 Thread Nicolai Constantin Reuschling
You want to start here, Pradheep: http://lmgtfy.com/?q=rails+deployment+with+capistrano --~--~-~--~~~---~--~~ 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

[Rails] Reg: deployment

2009-10-14 Thread Pradheep R.b
Hi, I am very new to deploy process... i have an ror application and i am using netbeansIDE6.5. i dont know how to deploy and move the application to production mode . Please explain me how to deploy in step by step -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Jez
Thanks Conrad I will have a go. I found myself pointed to the Hivelogic tutorials from most places ie lynda.com & ADC. Much Appreciated Jez On 14 Oct, 11:56, Conrad Taylor wrote: > On Wed, Oct 14, 2009 at 2:22 AM, Jez wrote: > > > Hi All. > > Ive heard so much about RoR now Iand i would real

[Rails] Re: how to implement get and post method in Ruby on Rails

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 3:44 AM, Yousef Jawwad < rails-mailing-l...@andreas-s.net> wrote: > > hi everybody > > I am trying to develop a simple Ruby on Rails application . > > what I want to know , how I can implement get and post method in Ruby on > Rails > > > thanks in Advance > What are you tr

[Rails] Re: Really need some help with production environment installation

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 2:22 AM, Jez wrote: > > Hi All. > Ive heard so much about RoR now Iand i would really like to get my > hands dirty. Only trouble is i just cant seem to get it up and > running: > > Ive followed the hivelogic instructions several times on two different > mac's. > when i st

[Rails] how to implement get and post method in Ruby on Rails

2009-10-14 Thread Yousef Jawwad
hi everybody I am trying to develop a simple Ruby on Rails application . what I want to know , how I can implement get and post method in Ruby on Rails thanks in Advance -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message

[Rails] Re: attr_accessor :password

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 3:21 AM, Ralu rm wrote: > > Conrad Taylor wrote: > > On Wed, Oct 14, 2009 at 2:34 AM, Ralu rm > > wrote: > > > >> may have noticed that > >> value to authenticate a user’s login credentials. > >> " > >> > >> but i ddn understand clearly... can any explain in better way! > >

[Rails] Really need some help with production environment installation

2009-10-14 Thread Jez
Hi All. Ive heard so much about RoR now Iand i would really like to get my hands dirty. Only trouble is i just cant seem to get it up and running: Ive followed the hivelogic instructions several times on two different mac's. when i start an app, and then try to $script/server, i get a message te

[Rails] How to configure every (postgresql) db connection?

2009-10-14 Thread Tilmann Singer
I would like to set some db session variables specific to my application on the database connection that rails uses. They can be set by issuing an SQL command like "SET statement_timeout = 1000" once - it will be in effect for every subsequent SQL statement that uses this connection. So I tried t

[Rails] Re: attr_accessor :password

2009-10-14 Thread Ralu rm
Conrad Taylor wrote: > On Wed, Oct 14, 2009 at 2:34 AM, Ralu rm > wrote: > >> may have noticed that >> value to authenticate a user’s login credentials. >> " >> >> but i ddn understand clearly... can any explain in better way! >> > > Where can one find this example? > > -Conrad i got dat from

[Rails] Re: attr_accessor :password

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 2:34 AM, Ralu rm wrote: > > attr_accessor :password > dis is small bit of code i have seen in a tutorial . > > in that example there is no field called password in the database, so > how can rails understand its the password field of my database. in my > database i have giv

[Rails] attr_accessor :password

2009-10-14 Thread Ralu rm
attr_accessor :password dis is small bit of code i have seen in a tutorial . in that example there is no field called password in the database, so how can rails understand its the password field of my database. in my database i have given password field as hashed_password i got an explanation fo

[Rails] Re: Easy Way to identify Partials

2009-10-14 Thread Frederick Cheung
On Oct 13, 9:16 pm, mike wrote: > > It would be lovely if there was a plugin that accomplishes this. I would > also appreciate any hint as to how achieve this functionality. > I wrote this a little while ago: http://github.com/fcheung/tattler Fred > Thanks, Mike > > On Mon, Oct 12, 2009 at 3:0

[Rails] Re: Label Reference of Fixtures

2009-10-14 Thread Colin Law
2009/10/14 Stallion : > > Hi,... > > I am having trouble with label reference in fixtures... > > I have two fixtures like this : > > ### cars.yml > one: >  name: Ferari This should be Ferari: name: Ferari > two: >  name: Volvo > > ### drivers.yml > one: >  name: Stall >  car: Ferari The Ferar

[Rails] Re: Label Reference of Fixtures

2009-10-14 Thread Frederick Cheung
On Oct 14, 8:34 am, Stallion wrote: > Hi,... > > I am having trouble with label reference in fixtures... > > I have two fixtures like this : > > ### cars.yml > one: >   name: Ferari > two: >   name: Volvo > > ### drivers.yml > one: >   name: Stall >   car: Ferari > > 'Drivers' table have a 'bel

[Rails] Re: Easy Way to identify Partials

2009-10-14 Thread mike
Yay, thank you Greg! On Wed, Oct 14, 2009 at 12:06 AM, Marnen Laibow-Koser < rails-mailing-l...@andreas-s.net> wrote: > > Greg Donald wrote: > > On Mon, Oct 12, 2009 at 3:29 AM, wrote: > >> Do you know of an easy way to identify which part of a page comes from > which > >> partial file? Perhaps

[Rails] Label Reference of Fixtures

2009-10-14 Thread Stallion
Hi,... I am having trouble with label reference in fixtures... I have two fixtures like this : ### cars.yml one: name: Ferari two: name: Volvo ### drivers.yml one: name: Stall car: Ferari 'Drivers' table have a 'belongs_to' clause to the 'cars' table, vice versa with 'has_many' Evert

[Rails] Re: Nokogiri: to_s WITHOUT html surrounding's tags?

2009-10-14 Thread Joshua Muheim
Joshua Muheim wrote: > Thank you, guys. I didn't know that Nokogiri creates a complete (X)HTML > DOM when reading an incomplete structure. > > Have a great day! Another question. I don't get Nokogiri to produce XHTML. So for example I get unclosed tags like instead of . I found some options

[Rails] Re: Maximum for has_many relationship?

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 12:08 AM, David wrote: > > Im wondering, is there a way to set a limit/maximum for the number of > objects saved in a has_many relationship? For example, I have Users > that have a has_many relationship with the model BaseballCards. Is > there a built-in model function t

[Rails] Re: Select statements do not work on MySQL

2009-10-14 Thread Adam Meyer
Conrad Taylor wrote: > On Wed, Oct 14, 2009 at 12:28 AM, Adam Meyer < > rails-mailing-l...@andreas-s.net> wrote: > >> > you might need to contact your hosting support. >> > >> Obviously with my specific parts. >> It's really unbelivable. >> > > What happens when you attempt to access the databas

[Rails] Re: Why need before_validation etc methods be public?

2009-10-14 Thread Joshua Muheim
OK, strange. Anyway, thanks to you guys! -- 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@g

[Rails] Re: Nokogiri: to_s WITHOUT html surrounding's tags?

2009-10-14 Thread Joshua Muheim
Thank you, guys. I didn't know that Nokogiri creates a complete (X)HTML DOM when reading an incomplete structure. Have a great day! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: How to exit rails application from within

2009-10-14 Thread Damjan Rems
Is the kill from outside application the only solution? by TheR -- 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 em

[Rails] Re: Will the sky fall down if I install Ruby on Rails?

2009-10-14 Thread Chris Kottom
Sysadmin 101: Don't build a playground environment for unfamiliar software on any server you can't afford to reboot every now and then. Install it locally, get familiar with it, and then see if you want to deploy to your production servers. Or get yourself a cheap VPS and work out the kinks ther

[Rails] Re: Select statements do not work on MySQL

2009-10-14 Thread Conrad Taylor
On Wed, Oct 14, 2009 at 12:28 AM, Adam Meyer < rails-mailing-l...@andreas-s.net> wrote: > > Dhruva Sagar wrote: > > No, what I meant was to check for the permissions of the database user > > from > > the database configurations.Not from rails side. From mysql there might > > be > > some configurat

  1   2   >