Showing posts with label rails. Show all posts
Showing posts with label rails. Show all posts
Thursday, April 16, 2015
Single Sign on: Managing Authentication with Google, Twitter and Facebook accounts.
Last month on Tech Talk Tuesday we talked about setting up Single Sign on for websites. Today's web solutions are based on a standard called OAuth2.
It's not difficult to allow multiple login options to a site. The Javascript library Passport works great for node.js applications. The Oauth gem does the job for Ruby on Rails applications. And the WP-Oauth plugin is great for Wordpress sites.
What really impressed us was how easy it was to install and configure Oauth for Meteor applications. Meteor is an impressive framework for setting up node.js applications quickly. We'll be exploring it more soon.
Labels:
meteor,
node.js,
ouath2,
rails,
single sign on,
Tech Talk Tuesday
Wednesday, February 24, 2010
will_paginate gem gets stuck on the first page.
Problem
The latest version of will_paginate ignores the page parameter using Rails > 2.2
recs = User.paginate, :page => 1 , :per_page => 1
recs2 = User.paginate, :page => 2 , :per_page => 1
assert_not_equal recs.first, recs2.first
Solution
Using the 'order' parameter fixes the problem:
recs = User.paginate, :page => 1 , :per_page => 1 , :order => 'username'
recs2 = User.paginate, :page => 2 , :per_page => 1 , : order => 'username'
assert_not_equal recs.first, recs2.first
Tuesday, December 8, 2009
undefined method `reflect_on_all_associations'
Using Rails 2.3.5 , I started recieving this error when running all unit tests on an older application.:
The problem was happening when Rails was trying to load fixtures. Removing all the fixures removed the error. After adding back a few at a time, I narrowed the problem down to the Fixtures for an object called Content :
The Content object has a field called type, which is reserved for Single Table Inheritance. renaming that field solved the problem.
The vague undefined method `reflect_on_all_associations' can have a variety of sources, In general, it means there's a problem with a Model object.
See Also:
http://iridescenturchin.wordpress.com/page/2/
http://sourceforge.jp/projects/rubycocoa/lists/archive/devel/2008-January/001293.html
1) Error:
test_truth(CommitmentTest):
NoMethodError: undefined method `reflect_on_all_associations' for Object:Class
1 tests, 0 assertions, 0 failures, 1 errors
The problem was happening when Rails was trying to load fixtures. Removing all the fixures removed the error. After adding back a few at a time, I narrowed the problem down to the Fixtures for an object called Content :
The Content object has a field called type, which is reserved for Single Table Inheritance. renaming that field solved the problem.
The vague undefined method `reflect_on_all_associations' can have a variety of sources, In general, it means there's a problem with a Model object.
See Also:
http://iridescenturchin.wordpress.com/page/2/
http://sourceforge.jp/projects/rubycocoa/lists/archive/devel/2008-January/001293.html
Subscribe to:
Posts (Atom)
Popular Articles
-
Today's Tech Talk Tuesday is virtual, we'll do a live one next week. Learn how to code with R like DataFrames in Julia. And see...
-
At April's Tech Talk Tuesday , we previewed six Modern Customer Relationship Management (CRM) Systems . There are hundreds of CRM ...
-
Top 10 Cloud Apps for your Business introduced apps often used from the cloud. There are several vendors to chose from when implementin...
-
Two great things about Ruby are it's brevity and it's dynamic nature. A great way to introduce Ruby to a project written in another...