[Rails] adding different title for a single form in rails

2012-09-28 Thread ruby rails
I have a Task management applciation where users can add task and edit it. I am using single form for it. When I render this form for edit and new, I need to assign the different form title for each. Say "Edit task" and "Assign new task". How do I implement it. I am new to rails. Please help. --

Re: [Rails] Re: spredsheet_on_rails support only 2003 xls not 2007 & 2010 xlsx ERROR-"OLE2 signature is invalid".

2012-09-28 Thread Dheeraj Kumar
Stop bumping your question. That is really annoying. You haven't posted your code, so how do you expect anyone to give you a meaningful reply? Also, if you have done a google search on reading excel files in ruby, you would have known of at least two libraries which read Excel files. Please

[Rails] Re: spredsheet_on_rails support only 2003 xls not 2007 & 2010 xlsx ERROR-"OLE2 signature is invalid".

2012-09-28 Thread Fahim Patel
any one about this On Thursday, September 27, 2012 6:48:57 PM UTC+5:30, Fahim Patel wrote: > > hi all > i wish to upload a spreadsheet file and all the content of that file > should be save in my mysql database. > > my code working best with xls 2003 but when i upload xlsx 2007 & 2010 i > get e

Re: [Rails] How do you create a link to a resource that expires

2012-09-28 Thread Christopher R. Maden
On 09/28/2012 06:21 PM, Matt Martini wrote: > Are there any gems/plug-ins out there for this? How would I go about > creating it from scratch? Not sure about existing gems, not having looked at this in Ruby or Rails, but having solved it in another language: you create an entry in your database w

[Rails] Rails with Phusion Passenger and Apache

2012-09-28 Thread Mandeep Kaur
Hello All, I want to start Rails3 app with apache and passenger but I am not able to do that. I have followed some links but for me its not working or I am not getting it properly. Here the links that I have followed: http://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger https://

[Rails] rails 3.2 nested form names not correct

2012-09-28 Thread Me
I have a person has many questions model, I have accepts_nested_Attributes set up properly. the question from the db show up, but the index is not incrementing: <%= f.fields_for :person_questions do |pregunta| %> Questions: <% Question.all.each do |question| %>

[Rails] Re: f.send in form?

2012-09-28 Thread Me
Been a while, I had the closing bracket in the wrong spot: send needs all the params, it was erroring on , if i put the closing bracket right after the data_type or name <%= person_question.send(question.data_type.to_sym, question.name, :class => 'text_field') %> On Monday, July 30, 2012 5:01:42

[Rails] How do you create a link to a resource that expires

2012-09-28 Thread Matt Martini
I would like to send a link to a user (via email) that expires after a period of time. When a user takes a certain action, they are emailed a link that allows them access to a certain resource. What I want to do is make it so that the link will work for a period of time (say 48 hours) and then

Re: [Rails] devise validatable and password_confirmation presence

2012-09-28 Thread enrico stano
Ok I got it. You're probably right. The validation for the confirmation field it's related to the comparation with the original field. Thanks 2012/9/28 Norbert Melzer : > Can't follow you… all the confirmation-fields you probably have, don't > need to be checked if they are present… That's throwi

Re: [Rails] devise validatable and password_confirmation presence

2012-09-28 Thread Norbert Melzer
Can't follow you… all the confirmation-fields you probably have, don't need to be checked if they are present… That's throwing away CPU cycles and therefore money! It is simple logic: When all validations pass on the original field they will also pass on the corresponding confirmation field, as l

[Rails] Re: How to Include Associations in #as_json

2012-09-28 Thread gsw
to_json and as_json are not what you are probably looking for. If you are using a decently up-to-date version of Rails, look at: https://github.com/josevalim/active_model_serializers That is what is going to be used in Rails 4. If you want Hypermedia (links to resources, etc.), HAL support, etc

[Rails] How to Include Associations in #as_json

2012-09-28 Thread Ari King
Hi, Does anyone know how to include nested associations when overriding a model's #as_json method? Below is my attempt to include direct and nested associations. NOTE: "office" is a direct association, "company" is nested association via "office". I'd like both included in the generated json out

[Rails] devise validatable and password_confirmation presence

2012-09-28 Thread enrico stano
Hi, I was writing some tests when I discovered (god bless testing...) that my User model, that use Devise, doesn't validate the presence of the :password_confirmation field. I was expecting that adding :validatable to the Devise option would include the presence validation for this field too.

[Rails] Re: Best way to hook into class_attribute setter?

2012-09-28 Thread gsw
This definitely is at least partially because of the order of execution in ActiveSupport::Concern: base.extend const_get("ClassMethods") if const_defined?("ClassMethods") if const_defined?("InstanceMethods") base.send :include, const_get("InstanceMethods") Act

Re: [Rails] collection_select doesn't populate the drop down list

2012-09-28 Thread Hassan Schroeder
On Fri, Sep 28, 2012 at 7:49 AM, Ke En wrote: > <%= collection_select(:page, :user_id, @users, :id, :full_name, > :include_blank => false) %> > This is the html code that is generated > > > > > > > > > Do those numbers look like valid user_id values? If so, are you sure your U

Re: [Rails] RVM settings lost after every logout

2012-09-28 Thread chichibek bros
thanks victor i will try both suggestions 2012/9/28 Victor Goff > For sure check the answer again where they said to source that line in > your bashrc or bash_profile dot file. > > Read the RVM installation notes carefully. You will get there. > > -- > You received this message because you are

Re: [Rails] RVM settings lost after every logout

2012-09-28 Thread BalaRaju Vankala
Hey I am also face the same Problem but after google it i found solution may be it is useful to you In Ubuntu 11.10 please change your GNOME terminal setting : go to Terminal 1. *Edit > Profile Preferences open* 2. Open : *Title and Command* Tab 3. Check : *Run Command as a login Shell*

[Rails] Best way to hook into class_attribute setter?

2012-09-28 Thread gsw
I have some class attributes that I'm setting in an ActiveSupport::Concern and would like to hook into class_attribute setters, but is really isn't acting like I would assume. Here's what I did to test. I didn't create a different controller, because just wanted to try to do as little as possib

[Rails] collection_select doesn't populate the drop down list

2012-09-28 Thread Ke En
I'm having an issue using collection_select to create a drop down menu. All the guides say that this <%= collection_select(:page, :user_id, @users, :id, :full_name, :include_blank => false) %> should work but when I run the server, instead of a list of users appearing it's just a blank list. The

[Rails] BcmsFckeditor fails with browsercms 3.5.3

2012-09-28 Thread Priyanka Pathak
Hello Guys, I was trying to upgrade the existing browser_cms project to latest version. Had use the bcms_fckeditor as well. But when trying to load page where fckeditor available than it shows some js and xml loading error. Here i have pasted the error. JS error. "NetworkError: 404 Not Found - ht

[Rails] Re: undefined method 'cms_connector_path' during browsercms 3.5.3

2012-09-28 Thread Priyanka Pathak
Hello Guys, Found the solution to overcome this problem by replacing 'cms_connector_path' to 'cms.connector_path' -- 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, sen

[Rails] Re: How the difference between Observer and Sweeper?

2012-09-28 Thread Marcelo Junior
Sorry my English, I'm going to write again my question: I'm thinking in using some of them to work with cache. Which should I use? -- 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 th

[Rails] How the difference between Observer and Sweeper?

2012-09-28 Thread Marcelo Junior
I'm think to use any to work with cache. How I should to use. -- 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 unsubscri

Re: [Rails] RVM settings lost after every logout

2012-09-28 Thread Victor Goff
For sure check the answer again where they said to source that line in your bashrc or bash_profile dot file. Read the RVM installation notes carefully. You will get there. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this

[Rails] Dynabyte bjuder in till SHRUG den 1 november!

2012-09-28 Thread Elin Uppström
Kom till oss på Kammakargatan 9A den 1 november. Vi startar klockan 18.00 med mat och sedan följer intressanta tal, mingel och kanske en öl eller två. Vi har begränsat med platser så ta er tid att gå in på http://simplesignup.se/event/14236och anmäl dig

[Rails] LDAP gems: paged search with net-ldap

2012-09-28 Thread adam321
Hi, client: Ruby Gem net-ldap Server: eDirectory v8.8.6 Net-ldap uses paged search and here are the eDirectory messages: iterCountEntries: ispositionable returned FALSE and after the 126th entry (MaxPageSize=126 harcoded in net-ldap) the search is aborted: invalid paged result control

[Rails] RVM settings lost after every logout

2012-09-28 Thread Melvin Pineda
hi group im new to rails i follow instruction about instalation rails in ubuntu12.04 in this url https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm everything was just fine but when i logout or restart the pc rails is lost

[Rails] Rails 3 Facebook Authentication - Omniauth-Facebook

2012-09-28 Thread Nitin Misra
In this code - FB.login( function(response) { if (response.authResponse) { return window.location = '/auth/facebook/callback'; } }, { scope: 'email' } ); Instead of doing "window.location" here, how it can be done through ajax? Please help. -- You received thi

[Rails] create database and run migration at run time

2012-09-28 Thread gagan sharma
Hi, I have to create databases at run time depending on the name of the new user's company and to run all the migrations for that new database. for example: If a new user get registered and enter ABC as his company name, then we will check if there is any existing user with same company. If we do