Coder Social home page Coder Social logo

sequel-devise's People

Contributors

andreychernih avatar eugenk avatar rosenfeld avatar til avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sequel-devise's Issues

Devise version should be specified in gemspec

sequel-devise devise dependency should be locked in gemspec. Thing is I am having a hard time setting devise with sequel and it could be due to devise version. I would need to know if there is a devise version that works with this gem and if thus it may be a good idea to have it locked in the gemspec.

a little more bugs. :(

when i use has_many :model

it would generate this error:

/home/muhammad/devel/quadifi/app/models/user.rb:12:in `<class:User>': undefined method `has_many' for  User:Class (NoMethodError)
from /home/muhammad/devel/quadifi/app/models/user.rb:1:in `<top (required)>'

when i comment it out, my app works okay. :)

i don't think i need belongs_to as the devise model is the main model for all my user accounting and i'm unsure if anyone needs attr_accessible anyway.

devise generator does not create migration

$ rails g devise User
error sequel [not found]
route devise_for :users

Normal generation works fine though. (having the Sequel.migration in migration file)

$ rails g migration AddTestToPrepaids test:integer
invoke sequel
create db/migrate/20131209092231_add_test_to_prepaids.rb

(i am using sequel-rails with sequel-devise)

devise confirmable throws exception

just posted a plugin that fixes the issue i'll outline below but think it may be better off rolled into your gem instead of sitting as its own plugin. what do you think?

basically i ran into an exception when including the devise confirmable module (using sequel 4.7 and devise 3.2.2)

i'll just copy and paste from the readme over at the repo i mentioned:

A class as simple as:

  class User < Sequel::Model
    plugin :devise
    devise :database_authenticatable, :confirmable
  end

would cause an exception:

wrong number of arguments (2 for 0..1)

I tracked the issue down to some code in devise:

before_create :generate_confirmation_token, :if => :confirmation_required?

that code uses a hook syntax with 2 arguments (:generate_confirmation_token and a hash of {:if => :confirmation_required?}) that's not supported by Sequel!

4.2.0 regression due to new #inspect method

Just so that you are aware: heartcombo/devise#4187

This is quite ugly and is probably something that the devise guys will fix shortly, but that #serializable_hash thing seems important. Or maybe not? Should it be reimplemented here, or it's not policy of the gem to patch all methods out of the scope of active model and orm adapter?

validatable doesn't work out of the box

validatable makes a call to email_changed? (requires ActiveModel::Dirty )

including the sequel dirty plugin is a start but the sequel and ar apis are different. sequel has a column_changed?(:name) method whereas ar adds an #{COLUMN_NAME}_changed? method for each column.

i think sequel-devise should include the dirty plugin and add a #{COLUMN_NAME}_changed? method for each column that then calls column_changed?(#{COLUMN_NAME})

validatable.rb:44:in `assert_validations_api!': Could not use :validatable module

/usr/local/rvm/gems/ruby-1.9.3-p448/gems/devise-3.2.2/lib/devise/models/validatable.rb:44:in `assert_validations_api!': Could not use :validatable module since User does not respond to the following methods: validates_presence_of, validates_uniqueness_of, validates_format_of, validates_confirmation_of, and validates_length_of. (RuntimeError)

using sequel-rails and sequel-devise

undefined method `encrypted_password_changed?' for #<User:0x0000000a947eb0>

I had to disable password resets for now (if the user forgets his password) because when i use

devise: recoverable

The error that shows is

undefined method `encrypted_password_changed?' for #<User:0x0000000a947eb0>

Traceback:

      included do
        before_save do
          if email_changed? || encrypted_password_changed?
            clear_reset_password_token
          end
        end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.