Re: [Rails] Career

2012-07-27 Thread Amrit Pal Pathak
On Fri, Jul 27, 2012 at 10:15 AM, Amardeep Singh er.amar1...@gmail.com wrote: Future in Ror Future is bright.it depends upon you how much you are master with RoR. -- Thanks Regards Amrit Pal Mobile No:+9780584363 Website:amritpalpathak.blogspot.com -- You received this message

[Rails] Same name action and attribute in a model

2012-07-27 Thread Sumit Srivastava
I have been following following tutorial to make a user login session. http://www.aidanf.net/rails_user_authentication_tutorial I used the following action to encrypt the password. def password #debugger @password1=pass self.salt = SecureRandom.hex(10) if !self.salt?

[Rails] [JOB] ActionScript (AS3) Developer - NYC

2012-07-27 Thread OSS
I've got the following 6-month contract opp available. Let me know if you are interested. ActionScript (AS3) Developer - NYC * 5+ years ActionScript experience (ActionScript 3.0 required) * Understanding of Object-Oriented Design * Experience in developing real-time network applications *

[Rails] omg sorry for the last post - wrong list

2012-07-27 Thread OSS
so embarrassed. =/ -- 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 email to rubyonrails-talk+unsubscr...@googlegroups.com. For

[Rails] JOB: Sr. Rails Dev, NYC - 150-180k...

2012-07-27 Thread OSS
I've got a Sr. Rails job in NYC paying 150-180k. It's regular full time, salaried, 100% on-site, with benefits, etc. If you are interested in hearing more, please submit your resume and I'll get back to you with details. Your resume will not be shared with anyone w/o your consent. Thank you,

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Michael Pavling
On 27 July 2012 07:22, Sumit Srivastava sumit.theinvinci...@gmail.com wrote: I have been following following tutorial to make a user login session. http://www.aidanf.net/rails_user_authentication_tutorial I used the following action to encrypt the password. def password #debugger

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Michael Pavling
On 27 July 2012 08:07, Michael Pavling pavl...@gmail.com wrote: Which (if any) of those lines is line 26 in your UserController? What does the User.encrypt method look like? Ignore me... I can't even read your error message properly myself. I used the following action to encrypt the password.

Re: [Rails] Career

2012-07-27 Thread Amardeep Singh
If I master than what is the future -- 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 email to

[Rails] Re: simplify the entry point url for rails 3.2

2012-07-27 Thread radical
nvm, i already know how to used it.. they just rename the 'map.connect' to 'match'... lol so we just need to use this code match 'Person' , :controller= 'people', :action = 'list' -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
This is the complete model. I am trying to encrypt the password. require 'digest/sha1' class User ActiveRecord::Base attr_accessible :mailid, :name, :password, :username validates:name, :presence=true validates:mailid, :presence=true validates:username, :presence=true

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
I am not exactly following the tutorial. I have customized things according to my requirements. Regards Sumit Srivastava The power of imagination makes us infinite... On 27 July 2012 15:12, sumit srivastava sumit.theinvinci...@gmail.comwrote: This is the complete model. I am trying to

[Rails] Difference between save and create ?

2012-07-27 Thread manoj c.
Hi, Anybody please help me showing difference between save and create in ruby on rails. expecting help. Regards, Manoj. -- 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

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Michael Pavling
On 27 July 2012 10:42, sumit srivastava sumit.theinvinci...@gmail.com wrote: This is the complete model. I am trying to encrypt the password. def self.hashedpass(login, pass) u=find(:first, :conditions=[login = ?, login]) return nil if u.nil? return u if User.encrypt(pass,

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
The *self.hashedpass* action is still not in use. That is not of concern right now. I need to encrypt the password chosen by user and save it. In this tutorial, it sets an *attr_accessor password* which executes the instance method *password=(pass). *The tutorial actually uses *hashes_password *as

Re: [Rails] Difference between save and create ?

2012-07-27 Thread Loganathan Sellapa
Refer this link ' http://www.rorexperts.com/differences-between-create-and-save-methods-in-active-record-t1348.html ' regards, Loganathan ViewMe http://vizualize.me/loganathan On Fri, Jul 27, 2012 at 3:20 PM, manoj c. li...@ruby-forum.com wrote: difference between save and create -- You

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Michael Pavling
On 27 July 2012 11:13, sumit srivastava sumit.theinvinci...@gmail.com wrote: During customizations I have used password as the column where encrypted password shall be saved. So I created my own attr_accessor, i.e., passwordtext. I have named the password_field_tag in my form as passwordtext.

[Rails] Re: Difference between save and create ?

2012-07-27 Thread manoj c.
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-talk@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
This is what I receive, SystemStackError (stack level too deep): app/models/user.rb:26:in `password=' app/models/user.rb:27:in `password=' app/controllers/user_controller.rb:31:in `new' app/controllers/user_controller.rb:31:in `createuser' Here *createuser* action is used to store the

[Rails] Re: Same name action and attribute in a model

2012-07-27 Thread Sumit Srivastava
User.random_string does not exists any more. So had to use * SecureRandom.hex(10)* On Friday, 27 July 2012 11:52:43 UTC+5:30, Sumit Srivastava wrote: I have been following following tutorial to make a user login session. http://www.aidanf.net/rails_user_authentication_tutorial I used the

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Tom Meinlschmidt
I'm using before_save :encrypt_password def encrypt_password unless password.blank? self.password_digest = BCrypt::Password.create(password) self.password = nil self.password_confirmation = nil end end tom On Jul 27, 2012, at 12:30 , Michael Pavling

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Michael Pavling
On 27 July 2012 11:37, sumit srivastava sumit.theinvinci...@gmail.com wrote: This is what I receive, SystemStackError (stack level too deep): app/models/user.rb:26:in `password=' app/models/user.rb:27:in `password=' app/controllers/user_controller.rb:31:in `new'

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
Pavling, I removed the line *self.password = User.encrypt(@password1, self.salt) *and rest worked fine. So I deduced that this might be calling password action again and going into recursive action. That's the reason I changed my variables as explained earlier.. Tom, That might be another

[Rails] Getting error while starting server plz help

2012-07-27 Thread Rishi Aggarwal
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.14/lib/rails_generator/options.rb:32:in `default_options': undefi ned method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError) from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.14/lib/rails_generator/base.rb:90:in

Re: [Rails] Getting error while starting server plz help

2012-07-27 Thread Gintautas Šimkus
Has your server started without errors before? If so then, what have you changed (in the broadest sense: upgrade OS, ruby, rails version etc.?) since the last time it worked. In case it hasn't worked at all, let us know how you installed your ruby/rails/gems. 2012/7/27 Rishi Aggarwal

[Rails] Re: ::Rails.env based domain var

2012-07-27 Thread Matt Jones
On Thursday, 26 July 2012 15:30:42 UTC-4, Ruby-Forum.com User wrote: What's the right way to DRY up this statement in my app? if ::Rails.env == 'staging' domain = '.staging-domain.com' else domain = '.production-domain.com' end I am using it in a

[Rails] HTML5 Boilerplate for rails 3.2

2012-07-27 Thread Luke Hamilton
Hi all, I was just wondering if other people are following the html5boilerplate.comway in their Rails 3.2 apps, and if so what methods are they using? i.e just building it in gem by gem, or all by hand or some of the other boilerplate gem's that exist. Love to hear about people's experiences and

[Rails] Re: Getting error while starting server plz help

2012-07-27 Thread Rishi Aggarwal
Gintautas S. wrote in post #1070411: Has your server started without errors before? If so then, what have you changed (in the broadest sense: upgrade OS, ruby, rails version etc.?) since the last time it worked. In case it hasn't worked at all, let us know how you installed your

[Rails] How to get asset pipeline host url in Grape Api

2012-07-27 Thread Sasi
Hi All how can i get the asset pipeline host url in grape api to append to the image url in config/environments/development.rb ActionController::Base.asset_host = assets.example.com i have configured the asset url. How can i generate this image with asset host url in grape api -- You

Re: [Rails] Career

2012-07-27 Thread Amrit Pal Pathak
On Fri, Jul 27, 2012 at 1:13 PM, Amardeep Singh er.amar1...@gmail.com wrote: If I master than what is the future Then world is yours. Hope you will understand. -- Thanks Regards Amrit Pal Mobile No:+9780584363 Website:amritpalpathak.blogspot.com -- You received this message because you

Re: [Rails] Career

2012-07-27 Thread Gintautas Šimkus
As somebody already said, the future is bright if you are at X level. ... and to that you replied what if I am at X level... First of all you need to have comprehension abilities. If you are aiming for India or whichever else SPECIFIC market, then please ask there for a good answer. To us it

Re: [Rails] Career

2012-07-27 Thread Amardeep Singh
Here in this community there are so many expert thats why i am asking this question(future in Ror). They better tell me the right path. but i am not expecting such a Ridiculous response from people like you -- You received this message because you are subscribed to the Google Groups Ruby on

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Michael Pavling
On 27 July 2012 11:52, sumit srivastava sumit.theinvinci...@gmail.com wrote: That might be another solution. But what I am trying to know is why isn't this method working. And how is the action def password=(pass) actually being called. Because I didn't see any exclusive line where it is being

Re: [Rails] Career

2012-07-27 Thread Gintautas Šimkus
OK, so if you are expert you'll make up to and over $200K per year. Does that really help you? Can you work in such a place that provides such compensation (visa's, English language knowledge etc.?) 2012/7/27 Amardeep Singh er.amar1...@gmail.com Here in this community there are so many expert

[Rails] Re: Rails' inflections are messy

2012-07-27 Thread davidcelis
I don't think that's really a good option. Some Rails internals already rely heavily upon the inflections; there have to be some pluralizations loaded by default (whether from within the framework, or an inflections gem). If they WERE to be extracted into a gem (which is what I did), it would

Re: [Rails] Career

2012-07-27 Thread Peter Hickman
No matter what your RoR skills are saying something like They better tell me the right path makes you sound like a complete dick. I will give you a pass here because I suspect that your English language skills are lacking but if you come out with anything even vaguely like this in an interview you

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread sumit srivastava
Right now I have renamed it to passwordtext but originally it was password. I wrote about its behavior when named as password. Regards Sumit Srivastava The power of imagination makes us infinite... On 27 July 2012 19:39, Michael Pavling pavl...@gmail.com wrote: On 27 July 2012 11:52, sumit

[Rails] Looking for partners for doing a project

2012-07-27 Thread Adnan
Hello there, I'm quite new is rails platform. I'm looking for some partners who're quite knowledgeable about rails.This is a non-commercial project.The main objective is learning rails.Together we can build some awesome stuff and we can also exchange our knowledge .If you're interested please

Re: [Rails] Same name action and attribute in a model

2012-07-27 Thread Michael Pavling
On 27 July 2012 17:31, sumit srivastava sumit.theinvinci...@gmail.com wrote: Right now I have renamed it to passwordtext but originally it was password. I wrote about its behavior when named as password. Okay... so what help is that? What difference does what something *used* to be make?! If

Re: [Rails] Career

2012-07-27 Thread steve.en...@gmail.com
I'm sorry, Amardeep, but IMHO don't think you're going to make it as a developer. A developer finds his or her way through, by evaluating situations, applying creative thought, making informed decisions without having to ask which way to turn. A developer is a path-maker, sees opportunities

[Rails] Re: installing ruby on rails 1.9.3 on windows 7

2012-07-27 Thread nishant g.
Luis Lavena wrote in post #1064505: On Monday, June 11, 2012 4:49:39 PM UTC-3, Ruby-Forum.com User wrote: did everything. used the rubyracer and copied the source in my gemfile. ran the bundle install again but no use. maybe i'm doing the process of adding the rubyracer wrong. i would be

[Rails] Form Bots and the Authenticity Token

2012-07-27 Thread Tom Rossi
How are bots able to create authenticity tokens that are valid? I thought for sure authenticity tokens would make my forms bullet proof for bots. Thanks, Tom -- 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] Form Bots and the Authenticity Token

2012-07-27 Thread Tom Meinlschmidt
from my experience, the best is to use some questions like 'what date is today' or 'what color do cranberries have' .. :) this is absolutely bulletproof tom On Jul 27, 2012, at 22:24 , Tom Rossi t...@themolehill.com wrote: How are bots able to create authenticity tokens that are valid? I

Re: [Rails] Form Bots and the Authenticity Token

2012-07-27 Thread Jason Fleetwood-Boldt
The authenticity token just ensures that the agent (person or bot) who submits the form first has to request the form. (right?) If it's a public form, a bot is just as capable of requesting the form, saving the authenticity token, and submitting it back with the authenticity token. The only

[Rails] Re: HTML5 Boilerplate for rails 3.2

2012-07-27 Thread Nicholas Faiz
Hi, I'm not a UX expert, at all, but do others think it's a bad thing there's a mouseover event that turns the 'HTML 5 BOILERPLATE' title to a deeper colour in a faux-link way but actually does nothing? Or is that just thinking too much about things? Cheers, Nicholas On Friday, July 27, 2012

[Rails] :validate = true on a belongs_to

2012-07-27 Thread John Merlino
:validate = true on a belongs_to tells Rails to validate the owner record when the owner record is being saved in order to get a foreign key value for the association. This doesn't seem to make sense, because you cannot save an association without saving first the owning record, so let's say:

[Rails] Inflector rules (singularization and pluralization) for Spanish

2012-07-27 Thread davidcelis
Hey, guys. Thought Spanish speakers who follow this board may appreciate that I've added Spanish inflector rules in my inflections gem: https://github.com/davidcelis/inflections I'm fairly well versed in Spanish, but I'm not a native speaker. If anybody notices errors or missing rules, please

[Rails] run :before_filter before loading controller's ActiveRecord model?

2012-07-27 Thread tom_302
Hello, I'm creating a Rails app on top of a legacy document management system. I'm looking for a way to force an ApplicationController's :before_filter method to execute before the ActiveRecord model is evaluated: class *Document* ActiveRecord::Base acts_as_controlled end My

[Rails] the :group and :having options on a has_many

2012-07-27 Thread John Merlino
I noticed the has_many relationship method allows for :group and :having options. Can anyone provide an example of when these would be used in a has_many? Something like this? has_many :accounts, :select = 'name, SUM(cash) as money', :group = :name, :having = 'created_at ?, 2.days.ago' I cant

[Rails] Re: Rails' inflections are messy

2012-07-27 Thread Rafael C. de Almeida
Maybe I'm missing something, but couldn't the default inflection just don't do anything? That is, the plural of any word is the word itself. From the user point of view, it would be like there is no pluralization at all. Cheers On Friday, July 27, 2012 12:00:59 PM UTC-3, davidcelis wrote: I