[Rails] Re: RUBY ON RAILS MIGRATION

2011-08-18 Thread Matthew Higgins
I highly recommend against composite keys. The composite gem breaks in every new rails version, and has broken edge cases. Stick with an integer primary key, and an integer for foreign keys. I wrote the foreigner gem. It expects that you are following the Rails conventions. It has no effect on

[Rails] Faye server with rails 3.1

2011-08-18 Thread ADNAN TAHIR
I want to use Faye on production server. how can I start faye server automatically or as a daemon process. Because when I start faye server using SSH it shutdown as i close ssh connection. Please guide me its really urgent. I can run faye server on local but how I can rub this on live site. --

[Rails] fulltime job oppurtunity

2011-08-18 Thread idealforce jobs
We have multiple full time positions with our Client for talented Cloud Infrastructure Engineers and Architects. They are starting a large scale full life cycle project and are interviewing candidates within various disciplines. Underlying architecture will be a LAMP stack with

[Rails] Re: file uploading controller

2011-08-18 Thread Kapil K.
you told to me this solution If you're using Paperclip or CarrierWave, just add two separate file attributes to your base model, following the usual instructions for either. If you want to be able to attach N number of files of any format to a base model, consider the nested_form Gem by Ryan

[Rails] RJS error rails 1.2.3 + firefox 4 and above

2011-08-18 Thread Sathiyaraj Gurusamy
Hi, In my application I used in admin module to expand and collpase functionality using ajax(link_to_remote) method. It's working fine in mozilla 3 and below version.. But when I using in mozilla 4 expand functinality was working fine but collapse are not work, it's just 'wrinkls'. My code is

[Rails] Re: How to use Oniguruma in ruby 1.9.2?

2011-08-18 Thread nishant
So what are the changes i have make in my ruby 1.8.7 syntax to parse my regular expressions for ruby 1.9.2 , Can you provide me some kind of link. On Aug 17, 11:54 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Aug 17, 3:26 pm, nishant nishantnig...@gmail.com wrote: Hello Guys ,

Re: [Rails] Best Rails install for production.

2011-08-18 Thread Eric Björkvall
apache + mod_fcgi - I get better performance than when I tried apache/passenger and apache/mongrel. I'm running this set up under FreeBSD, CentOS 5.x and Mac OS X 10.6 Can be a bit tricky to set up.. Cheers, Eric On 14 aug 2011, at 12:45, Frederick Cheung wrote: On Aug 14, 10:33 am,

[Rails] Re: how to work in group?

2011-08-18 Thread Alexey Muranov
Rodrigo, take a look at Distributed Workflow section in Git Community Book: http://book.git-scm.com/3_distributed_workflows.html It is assumed there however that everybody in your project has access to the full code. Alexey. -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] Re: why callback does not work

2011-08-18 Thread Colin Law
On 17 August 2011 15:31, Angelo Cordova acord...@gmail.com wrote: Debugging will tell you whether the callback is being called.  If you assign the result of Storage.create! to a variable and break after that then you will be able to inspect that object. I tried this  def before_create    

Re: [Rails] Getting started problems

2011-08-18 Thread Colin Law
On 17 August 2011 17:45, Murtuza murtuzafi...@gmail.com wrote: I am a newbie to Ruby on Rails. I created a new rails project, but when i go to that directory and do rails server to start the server, it asks me whether i want to overwrite config/initializations/session_store.rb Which version

[Rails] Re: autoloading LoadError: Expected known_ip.rb to define KnownIp

2011-08-18 Thread Alexey Muranov
I couldn't make it work with Admin:: namespace and submitted a bug report: https://github.com/rails/rails/issues/2572 Please comment. Alexey. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group.

[Rails] Multiple Errors with RRD and Rake

2011-08-18 Thread Walid CH
Hello all, I am trying to install the SequreISP application (link below) but I'm facing an error that I cannot resolve and any help is much appreciated. The application I am trying to install is: https://github.com/sequre/sequreisp Here's some information about my system: OS: Centos 5.4

[Rails] I18n and routing: bug?

2011-08-18 Thread kuraga...@mail.ru
Hello! It seems I have the same bug in Rails 3.0.9... https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4896 Why? Was it a bug? Is it a bug? Thank you! -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] how render to file

2011-08-18 Thread Shukhrat Tursunov
Hi I have a question when you open page from browser application renders the page and gives it to the browser how do that in action and save render page in html file Thanks! -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] multiple fields_for behavior

2011-08-18 Thread Matt Smith
With the following code and result below, why does the cars_attributes index (i.e. name=owner[cars_attributes][0][color]) increment in the second fields_for block when only one car is built? Shouldn't it stay the same because only one car was built? Is this standard behavior? If so, what is the

[Rails] Re: How to use Oniguruma in ruby 1.9.2?

2011-08-18 Thread Frederick Cheung
On Aug 18, 7:58 am, nishant nishantnig...@gmail.com wrote: So what are the changes i have make in my ruby 1.8.7 syntax to parse my regular expressions for ruby 1.9.2 , Can you provide me some kind of link. I think it's all backwards compatible - your existing regular expressions should still

Re: [Rails] Faye server with rails 3.1

2011-08-18 Thread Chris Mear
On 17 Aug 2011, at 23:31, ADNAN TAHIR wrote: I want to use Faye on production server. how can I start faye server automatically or as a daemon process. Because when I start faye server using SSH it shutdown as i close ssh connection. Please guide me its really urgent. I can run faye

Re: [Rails] how to work in group?

2011-08-18 Thread Chris Mear
On 17 Aug 2011, at 19:23, Rodrigo Ruiz wrote: hi, I've started developing websites with rails about 3 months ago, and now I need to work with for people at the same project. How can I do that? first, I can't allow access of the entire code to everyone for security purpose; second, it

[Rails] Re: How to use Oniguruma in ruby 1.9.2?

2011-08-18 Thread nishant
I changed Oniguruma::ORegexp.new with Regexp.new for example contents.to_s.gsub!(regular_expression, replace text) but it returns a nil value and does`nt seem to working as expected like (\/p)\s+(p) for removing paragraph tags form the content and i keep recieving this error message in the

Re: [Rails] Re: file uploading controller

2011-08-18 Thread Walter Lee Davis
On Aug 18, 2011, at 2:30 AM, Kapil K. wrote: you told to me this solution If you're using Paperclip or CarrierWave, just add two separate file attributes to your base model, following the usual instructions for either. If you want to be able to attach N number of files of any format to a

[Rails] Re: why callback does not work

2011-08-18 Thread Angelo Cordova
I tried this  def before_create     debugger    stg = Storage.create!(:product_id = self.product_id, :current_quantity  = self.quantity, :stg_data = purchase.prc_data) end and when I inspect the variable stg I got  stg = nil as result That is not surprising since you have

[Rails] rails 3.1 select multiple with serialized data

2011-08-18 Thread AppleII717
In my Users model I have serialize :roles Letting it default to yml I enter roles as a text array. e.g., u.roles = [member,scorer] It displays as an array @user.roles.type returns Array All is fine except if I try to use the select form helper to input the values with multiple = true

[Rails] Re: rails 3.1 select multiple with serialized data

2011-08-18 Thread AppleII717
Happens every time - I find the problem after the post. In the rails 3.0 version I capitalized the roles. In the rails 3.1 version I lower cased the roles. One of the few things I hate about ruby/rails case sensitivity. On Aug 18, 9:05 am, AppleII717 sa...@mac.com wrote: In my Users model I

Re: [Rails] Re: rails 3.1 select multiple with serialized data

2011-08-18 Thread Walter Lee Davis
Add a before_save filter and downcase/upcase/titleize them for uniformity! Walter On Aug 18, 2011, at 10:22 AM, AppleII717 wrote: Happens every time - I find the problem after the post. In the rails 3.0 version I capitalized the roles. In the rails 3.1 version I lower cased the roles. One

[Rails] How to pass an ERB template as string?

2011-08-18 Thread Rodrigo Alves Vieira
Hello everyone, I'm using a gem called aws-ses and I'm trying to sophisticate the email I am sending, here is the code currently: ses = AWS::SES::Base.new(:access_key_id = 'foo', :secret_access_key = 'bar') email ={ :to = #{subscriber.email}, :source = '#{ag.name}' no-reply@#{ag.domain}',

Re: [Rails] Re: why callback does not work

2011-08-18 Thread Colin Law
On 18 August 2011 14:50, Angelo Cordova acord...@gmail.com wrote: I tried this  def before_create     debugger    stg = Storage.create!(:product_id = self.product_id, :current_quantity  = self.quantity, :stg_data = purchase.prc_data) end and when I inspect the variable stg I got  

Re: [Rails] String column - Text, 255 limit?

2011-08-18 Thread Rob Biedenharn
On Aug 17, 2011, at 7:38 PM, Philip Hallstrom wrote: On Aug 17, 2011, at 3:32 PM, John Hinnegan wrote: So I'm using a column in my database to serialize a hash of extra data about an object. Stuff I'd want when displaying, but not anything else I care to have structured access to in my

[Rails] Namespaces and nested resources

2011-08-18 Thread Ajaxy
Hello! I'm developing online game (Heroes fighting against Clans) and i'm planning next structure of my app: i've got top-level resources Heroes (profiles of supermembers) and Clans (profiles of groups of members). So i've got both HeroesController and ClansController. What i wanna do is give

[Rails] Trivial SQL query - how to do it with ActiveRecord?

2011-08-18 Thread timeon
Hi, I've been trying to read ActiveRecord tutorials etc. but haven't figured out how to get the information I want. Let's say I have a users who own one to many bookshelves and some of these bookshelves contain books. Now I would like to get a list of books that belong to user named Timeon:

[Rails] How to disable rails from serving images in rails 3.1

2011-08-18 Thread Diego Bernardes
Hello!! How can i disable the rails 3.1 in development mode from serving images? I have some pages with tons of images and sometimes the page takes more than 10 seconds to load... Thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Rails 3.1rc6 assets / precompile change

2011-08-18 Thread sreid
I'm currently using Rails 3.1rc5, and deploy with capistrano. During deploy, I precompile the assets on the server using assets:precompile after deploy:symlink. I noticed that group :assets gems in my gemfile were being included in my production application processes (and adding a lot of memory

[Rails] Re: Rails 3.1rc6 assets / precompile change

2011-08-18 Thread sreid
Correct url above should be https://github.com/rails/rails/commit/0c57ae102f938b8f3d14d7cc37ab15b87bdaa4f5 -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To

[Rails] How to navigate between view using select

2011-08-18 Thread kevin ng'eno
Hi, im new to rails and I got a mind boggling issue. I have a select form populated with Institutes names e.g University of Yale. These records are obtained from the Institute ActiveRecord.The institutes table has a many to many relationships with the course table. My application should work

[Rails] need 2 lines of code in Ruby

2011-08-18 Thread himanshu soni
Tell us which school/organization you wish to support The attached image is what the second line should look like - http://tinypic.com/r/2rehzlx/7 -- 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: How to navigate between view using select

2011-08-18 Thread Charles Otieno
Got the same problem myself and I'm yet to crack it! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from

[Rails] Re: why callback does not work

2011-08-18 Thread Angelo Cordova
I tried this  def before_create     debugger    stg = Storage.create!(:product_id = self.product_id, :current_quantity  = self.quantity, :stg_data = purchase.prc_data) end and when I inspect the variable stg I got  stg = nil as result That is not surprising since you

Re: [Rails] How to navigate between view using select

2011-08-18 Thread Chirag Singhal
There are few issue in this: 1. You should not be doing sql queries directly from views, instead set the instance variable in controller and pass it to view. 2. Your form is submitting to /course/show, instead it should be /course/list 3. Controller name should be plural, you have got the name as

Re: [Rails] Re: why callback does not work

2011-08-18 Thread Colin Law
On 18 August 2011 17:48, Angelo Cordova acord...@gmail.com wrote: I tried this  def before_create     debugger    stg = Storage.create!(:product_id = self.product_id, :current_quantity  = self.quantity, :stg_data = purchase.prc_data) end and when I inspect the variable

[Rails] Re: Validates attributes that aren't even being changed

2011-08-18 Thread Leonel *.*
I temporarily solved the username attribute by not letting the user update the username. So the validation only works :on = :create So username attribute validation problem solved. Now I got the password validation problem. Ok, it seems the problem was kinda of obvious but I couldn't see it.

Re: [Rails] need 2 lines of code in Ruby

2011-08-18 Thread Colin Law
On 18 August 2011 16:52, himanshu soni soni.himanshu...@gmail.com wrote: Tell us which school/organization you wish to support The attached image is what the second line should look like - http://tinypic.com/r/2rehzlx/7 Is there a question there somewhere? Colin -- You received this

[Rails] Re: How to navigate between view using select

2011-08-18 Thread kevin ng'eno
Chirag Singhal wrote in post #1017338: There are few issue in this: Thanx alot Chirag, let me try out your hints . Will get back to you -- 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

[Rails] Rails 3 - Production Environment

2011-08-18 Thread CSK Vasanth
Hello Everyone, I need some help related to the below requirements: - I need to setup production environment without installing Ruby or Rails or other related gems into it. I did accomplish the same using JRuby, bundler and warbler plugin. And deployed the WAR file into Apache Tomcat server. But

[Rails] Re: Validates attributes that aren't even being changed

2011-08-18 Thread Leonel *.*
Can someone help me complete this piece of code? I'm thinking about using :unless because the only place where I wouldn't like the password validation is in the Edit User page. validates :password, :presence = true, :length = { :minimum = 6, :maximum = 20, :message = 'should have between 6 to

[Rails] difference between %= and %

2011-08-18 Thread Pepe Sanchez
Hi all what is the difference between %= and % in a view file? thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com.

[Rails] Re: How to disable rails from serving images in rails 3.1

2011-08-18 Thread Diego Bernardes
Nvm, the problem was with mongoid! MODEL PRELOADING In order to properly set up single collection inheritance, Mongoid needs to preload all models before every request in development mode. This can get slow, so if you are not using any inheritance it is recommended you turn this feature off.

[Rails] namespaces as scope :module

2011-08-18 Thread Ajaxy
Hello! I've got Gallery resource with namespaces: /gallery/galleries_controller.rb /gallery/albums_controller.rb /gallery/photos_controller.rb and models Gallery::Gallery, Gallery::Album and Gallery::Photo in my / models/gallery/ folder I want my Gallery work like standart resource:

[Rails] Math with table rows

2011-08-18 Thread Cássio Godinho
Lets supose I have a User table, and on this table I have height, weight and result rows. In a form I input height and weight values and want to multiply those two values and store on the resulta row on database. I was trying something like that def criar @user =

Re: [Rails] Math with table rows

2011-08-18 Thread Hassan Schroeder
2011/8/18 Cássio Godinho cassiopgodi...@gmail.com: In a form I input height and weight values and want to multiply those two values and store on the resulta row on database. I was trying something like that       def criar         @user = User.new(params[:user])         @result =

[Rails] How to get all urls of my application?

2011-08-18 Thread Rodrigo Alves Vieira
Hello everyone, how can I get all available urls of my application, I don't mean rake routes I mean some code that returns literally all the urls (or paths) for example let's say it's a blog application, with this code I should be able to see: / /about /contact /posts /posts/2011-08-18

[Rails] Re: how render to file

2011-08-18 Thread Shukhrat Tursunov
done. example how do that. after_filter :write_file def index end protected def write_file File.open('public/test.html', 'w+') do |f| f.write response.body end end On Aug 18, 5:41 am, Shukhrat Tursunov shuhra...@gmail.com wrote: Hi I have a question when you

[Rails] Re: why callback does not work

2011-08-18 Thread Angelo Cordova
On a separate issue, looking at the message you get, are you using ruby 1.9.1?  If so then upgrade to 1.9.2 or go back to 1.8.7, ruby 1.9.1 does not work reliably with rails.  This may have nothing to do with your problem. I'm using ruby 1.9.2 I note that you still have not answered my

[Rails] Fedena 2.1 is released

2011-08-18 Thread Unni Koroth
The long-awaited release of Fedena 2.1 is now available at Project Fedena. There are lot of new features added and all the identified issues of version 2.0 is resolved in this release. Official Blogpost - http://blog.foradian.com/fedena-21-is-released Github -

[Rails] LDAP Models

2011-08-18 Thread Beerlover88
I'm running Rails 3.09/Ruby 1.8.7, and I'm looking for some advice on how to create models from LDAP servers. I see there is an ActiveLDAP gem floating around out there, but it's Rails 3 support is only for 3.1rc4. Specifically, I'm trying to compare my user base on one LDAP server to another

[Rails] Re: why callback does not work

2011-08-18 Thread Angelo Cordova
On a separate issue, looking at the message you get, are you using ruby 1.9.1?  If so then upgrade to 1.9.2 or go back to 1.8.7, ruby 1.9.1 does not work reliably with rails.  This may have nothing to do with your problem. No, I'm using ruby 1.9.2 I note that you still have not

[Rails] Re: Opening a folder for file selection

2011-08-18 Thread Barney
Could you provide a code example of the connection between the links and an action that sends the file? I now have a list of links on a page but clicking them gives: Firefox doesn't know how to open this address, because the protocol (c) isn't associated with any program. Thanks, Barney

[Rails] Re: difference between %= and %

2011-08-18 Thread Stefano
And you couldnt just try that out yourself? :D On Aug 18, 7:39 pm, Pepe Sanchez li...@ruby-forum.com wrote: Hi all what is the difference between %=  and % in a view file? thanks -- Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] newbie: handling a method error

2011-08-18 Thread Dorijan Jelincic
Hi... I have 2 tables, connected with belongs_to and has_one and everything works ok until I get one entry in base where I dont have set id of belongs_to entry. How can I prevent it(except that that all entry has ids :) or dont print anithing in view? this is what I am talking about: I have

Re: [Rails] How to get all urls of my application?

2011-08-18 Thread Walter Lee Davis
On Aug 18, 2011, at 2:25 PM, Rodrigo Alves Vieira wrote: Hello everyone, how can I get all available urls of my application, I don't mean rake routes I mean some code that returns literally all the urls (or paths) for example let's say it's a blog application, with this code I should be

[Rails] Conflicts with Scriptaculous and jQuery

2011-08-18 Thread Shandy Nantz
Hi all, I have this rails website that works fine, but I wanted to experiment with jQuery a little so I added all the necessary file to my JavaScript folder and, well, all hell broke lose in that adding jQuery causes Scriptaculous/Prototype not to work while jQuery works kinda-fine. Doing a

[Rails] Re: Conflicts with Scriptaculous and jQuery

2011-08-18 Thread Shandy Nantz
I fixed it. Here was the problem. In my JavaScript include lines I had this: %= javascript_include_tag :defaults, 'scriptaculous', 'prototype', 'effects', 'controls', 'date-picker', 'jquery', 'jquery.min', 'application' % script // Don't take this out as long as you are using the jQuery and

Re: [Rails] newbie: handling a method error

2011-08-18 Thread Colin Law
On 18 August 2011 21:58, Dorijan Jelincic dma...@gmail.com wrote: Hi... I have 2 tables, connected with belongs_to and has_one and everything works ok until I get one entry in base where I dont have set id of belongs_to entry. How can I prevent it(except that that all entry has ids :) or dont

[Rails] Re: difference between %= and %

2011-08-18 Thread 7stud --
Tim Shaffer wrote in post #1017353: %= prints the contents of the tag, Well, it never meant that. %= tells ruby to print the result of the expression between the tags. For instance, %= 2+2 % would not print '2 + 2', it would print '4'. But even the result of the expression isn't an

Re: [Rails] newbie: handling a method error

2011-08-18 Thread Hassan Schroeder
On Thu, Aug 18, 2011 at 2:51 PM, Colin Law clan...@googlemail.com wrote: customer.firm.name I got error. %= customer.firm.name if customer.firm % Or possibly better to provide a method, say firm_name, of Customer that tests self.firm and returns the name or nil or maybe a default string if

[Rails] Re: Example of work with mongo

2011-08-18 Thread Alexey Petrushin
More examples: Save any pure Ruby object (also complex nested) in MongoDB https://github.com/alexeypetrushin/mongo_db + driver API enhancements (100% backward-compatible with original API), makes API more friendly handy, no extra abstraction or complexities introduced, all things are

[Rails] Re: namespaces as scope :module

2011-08-18 Thread Ajaxy
Spent a few hours looking through RoR sources and seems like i found some kind of solution: If we override property @_model_name in our models we can strip out Gallery:: from it: class Gallery::Gallery ActiveRecord::Base @_model_name = Gallery.model_name(self) end And in module: module

[Rails] Re: ActiveRecord (not Rails!)

2011-08-18 Thread Marc Chanliau
7stud -- wrote in post #1017182: Do you have mysql installed? mysql and the ruby mysql adapter are different things. Yes of course! And I have a database ready to be used with an activerecord application. -- Posted via http://www.ruby-forum.com/. -- You received this message because you

[Rails] Re: ActiveRecord (not Rails!)

2011-08-18 Thread Marc Chanliau
7stud -- wrote in post #1017183: Also, if you post your question plus the 'gem environment' output in the Ruby forum, they will be able to pinpoint what is going on very quickly. Your question is really a rubygems question, so posting it in the main Ruby forum is more appropriate. I posted

Re: [Rails] Re: ActiveRecord (not Rails!)

2011-08-18 Thread Fernando Almeida
Do you have installed the libmysqlclient? If not, install the libmysqlclient and reinstall the mysql gem. 2011/8/18 Marc Chanliau li...@ruby-forum.com 7stud -- wrote in post #1017183: Also, if you post your question plus the 'gem environment' output in the Ruby forum, they will be able

[Rails] Question about query

2011-08-18 Thread Bruno Meira
Hi guys, I have the following problem: In my application there is 3 entities that have this relationship: -1 post has many comments -1 comment belongs to one user and to one post -1 comment could be voted by many users My problem is how can I make a query to search for the best rated comment, in

Re: [Rails] Re: ActiveRecord (not Rails!)

2011-08-18 Thread Hassan Schroeder
On Thu, Aug 18, 2011 at 4:57 PM, Marc Chanliau li...@ruby-forum.com wrote: Your question is really a rubygems question, so posting it in the main Ruby forum is more appropriate. I posted there without any success, which is why I tried this topic list. What would you call success? I

Re: [Rails] How to pass an ERB template as string?

2011-08-18 Thread Jim Ruther Nill
On Thu, Aug 18, 2011 at 11:09 PM, Rodrigo Alves Vieira rodrig...@gmail.comwrote: Hello everyone, I'm using a gem called aws-ses and I'm trying to sophisticate the email I am sending, here is the code currently: ses = AWS::SES::Base.new(:access_key_id = 'foo', :secret_access_key = 'bar')

Re: [Rails] Re: how to work in group?

2011-08-18 Thread Rodrigo Ruiz
Thank you everyone, and that link helped me with git. Well, setting aside the code access concern, the other thing I wanted to know is how to work in a team with rails, and I mean, how should I split my project? For example, one member will do the Controllers, other will do the Models, other

Re: [Rails] LDAP Models

2011-08-18 Thread Bruno Santos
Devise + LDAP is a good idea to do it https://github.com/cschiewek/devise_ldap_authenticatable 2011/8/18 Beerlover88 ericschovi...@gmail.com I'm running Rails 3.09/Ruby 1.8.7, and I'm looking for some advice on how to create models from LDAP servers. I see there is an ActiveLDAP gem floating

Re: [Rails] LDAP Models

2011-08-18 Thread Long
I have had good success using the net-ldap gem (http://rubygems.org/gems/net-ldap). Though you will need to map the attribute values to your model by hand. Long --- On Thu, 8/18/11, Beerlover88 ericschovi...@gmail.com wrote: From: Beerlover88 ericschovi...@gmail.com Subject: [Rails] LDAP

[Rails] Re: Opening a folder for file selection

2011-08-18 Thread 7stud --
Okay. But I am a beginner too, so I don't know if this is the best way. I'm assuming the path to your folder is: /public/files_to_read class PagesController ApplicationController def home @title = Home end def get_files dir_path = 'public/files_to_read'

[Rails] Re: multiple fields_for behavior

2011-08-18 Thread Matt Smith
I solved this using content_for. I put everything in the first fields_for but the fields I wanted to move to a different partial, I placed in the content_for block. See the example below. Hope this helps, Matt # example %= f.fields_for :cars do |car_fields| % div class=field %=

[Rails] Sortable Nested Set for Rails 3.1.rc6 (Jquery + Nested set gem) released

2011-08-18 Thread Ilya Zykin
Hello! Dreaming about Drag and Drop for Nested Sets? It’s should be with JQuery? Here’s the solution! https://github.com/the-teacher/Sortable-Nested-Set Installing cd ~ git clone g...@github.com:the-teacher/Sortable-Nested-Set.git cd Sortable-Nested-Set/ sudo bundle install

Re: [Rails] Re: Validates attributes that aren't even being changed

2011-08-18 Thread Chirag Singhal
Try this :unless = Proc.new {|user| user.password.nil?} Essentially it will check if you are sending a password attribute to the user or not while updating the user record and will check for this validation only if password attribute is present. Chirag http://sumeruonrails.com On Thu, Aug

Re: [Rails] Math with table rows

2011-08-18 Thread Chirag Singhal
You should be doing this in the model, not controller. If you want to do this everytime the user record is saved, then define a before_save callback in your model and add this in the method def udpate_result self.result = self.height*self.weight end Note: You will have to convert height and

[Rails] blog creation

2011-08-18 Thread Annapoorna R
hi all, i am tryin to develop a blog in rails3...that should have all the basic functionalities of blog like *creating a article *,*posting* ,*comments *can anybody help me with this to start from the scratch.. is there any plugin to be installed? -- You received this message because you are

[Rails] Re: Rails 3 - Production Environment

2011-08-18 Thread CSK Vasanth
Can anyone shed some light on this? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send