This works with ActiveRecord session store and Devise, which is based on Warden, if you have session id. Within a controller: s = ActiveRecord::SessionStore::Session.find_by_session_id(session_id) # s… more →
idratherbewindsurfingwrote 6 days ago: This is probably caused by a callback returning false. Any callbacks in the ActiveRecord callback ch … more →
wrote 1 week ago: Callbacks are hooks into the life cycle of an Active Record object that allow you to trigger logic b … more →
wrote 1 week ago: Rails 3 allows you to define queries with named scopes, examples below. scope :all_lazy, select( … more →
wrote 1 week ago: Active Record offers many pre-defined validation helpers that you can use directly inside your class … more →
wrote 1 week ago: Active Record provides the following methods that perform common data definition tasks in a database … more →
wrote 1 week ago: Active Record supports the following database column types binary boolean date datetime decimal floa … more →
wrote 1 month ago: Taking care of concerns, my views are They are meant not to have large/GOD classes They are not spec … more →
wrote 1 month ago: If you use Ruby on Rails at all, you deal with ActiveRecord regularly and may not even be aware of h … more →
wrote 2 months ago: To automate whodidit and timestamps in yii activerecord model using beforesave() method. If the rule … more →
wrote 2 months ago: To automate whodidit and timestamps in yii activerecord model using beforesave() method. If the rule … more →
wrote 2 months ago: There are many ways to automate the setting of timestamps in yii ActiveRecord models. In this we are … more →
wrote 2 months ago: There are many ways to automate the setting of timestamps in yii ActiveRecord models. In this we are … more →
wrote 2 months ago: I had two models Article and Comment where I wanted to find out which articles had the most comments … more →
wrote 2 months ago: Considering Subcontracting For Ruby On Rails Consider The Following Java, Ruby on Rails, Perl, PHP, … more →
wrote 2 months ago: I was really helped by these couple resources that talk about merging scopes in different classes. h … more →
wrote 3 months ago: Learning How to be a Better Developer I see myself as a decent-ish software developer. I am great at … more →
wrote 3 months ago: What is the MVC design pattern? MVC or Model-View-Controller is a design pattern based on one entry … more →
wrote 3 months ago: (This post is a part of a series. See original) As the world’s largest marketplace for small s … more →
wrote 3 months ago: In your config/application.rb: # below all the other require ".../railtie" lines add: require "activ … more →