Re: [Rails] MySql Database Configration with Ruby On Rails.

2015-12-18 Thread Bayram Kuliyev
Please look here: http://edgeguides.rubyonrails.org/configuring.html#configuring-a-database On Fri, Dec 18, 2015 at 2:55 PM, Colin Law wrote: > On 18 December 2015 at 05:26, wrote: > > Hello Everyone > > > > > > MySql Database Configuration with Ruby On Rails. > > > > > > Tell Me the correct w

Re: [Rails] How fast a PHP Developer can learn Ruby on Rails

2015-12-16 Thread Bayram Kuliyev
You should start from (pure) Ruby, not from Ruby On Rails. On Wed, Dec 16, 2015 at 2:01 PM, Colin Law wrote: > On 16 December 2015 at 05:36, Mable T Anto wrote: > > Hi guys, > > > > I have more than 6 years of experience as PHP Developer, and now i want > to > > learn Ruby on rails. But i am co

Re: [Rails] Just Another ActiveRecord::ConnectionNotEstablished Question

2015-12-05 Thread Bayram Kuliyev
1) Did you install mysql properly? a) Try to connect to mysql server from a command line, and run some simple queries against your database. b) Create a simple (pure) Ruby application and try to connect to your database from this application. If it works fine, then your problem is Rails based.

Re: [Rails] Re: I have no idea what this means

2015-11-26 Thread Bayram Kuliyev
Eli, "Migrations are pending" means that you have created a migration file (in db/migrate folder) BUT a real database table has not been created yet. Simply creating a migration file does not create a database table. So you need to tell your rails application to create the table by entering 'bin/ra

Re: [Rails] Method telling whether an ActiveRecord has been newly created (and already persisted)?

2015-10-21 Thread Bayram Kuliyev
First of all you should give a rigour definition of "newly_created?". I mean, what should we consider "newly created"? A record created 1 second ago? 10 mins ago, or 1 day ago? On Wed, Oct 21, 2015 at 12:02 PM, Colin Law wrote: > On 21 October 2015 at 07:42, Eugene Gilburg > wrote: > > Severa

Re: [Rails] Ruby charting library?

2015-09-25 Thread Bayram Kuliyev
http://chartkick.com/ is awesome. I used it in one of my projects. You can integrate it even using pure Javascript. On Sat, Sep 26, 2015 at 5:33 AM, wrote: > There's quite a few actually. You can check out HighCharts or for > something even easier to learn check out Chartkick. > > Sent from my i

[Rails] Re: how to change the sort order for the collection?

2015-06-25 Thread Bayram Kuliyev
DESC not :DESC. Remove semicolons. On Thursday, June 25, 2015 at 9:09:11 PM UTC+5, Ruby-Forum.com User wrote: > > please help solve the problem. > tables: > users: > id: integer > name: varchar > > posts: > id: integer > title: varchar > user_id: integer > views: integer > > > models:

[Rails] Re: how to change the sort order for the collection?

2015-06-25 Thread Bayram Kuliyev
order('SUM(posts.views) DESC'). Remove semicolons. On Thursday, June 25, 2015 at 9:09:11 PM UTC+5, Ruby-Forum.com User wrote: > > please help solve the problem. > tables: > users: > id: integer > name: varchar > > posts: > id: integer > title: varchar > user_id: integer > views: integer

[Rails] has_secure_password: authenticate method

2013-06-29 Thread bayram kuliyev
has_secure_password has a method authenticate to authenticate users using bcrypt. In secure_password.rb file I found the following lines (from github): def authenticate(unencrypted_password) BCrypt::Password.new(password_digest) == unencrypted_password && self end BCrypt::Password.new(pas