I have the following Model:

  module DB
    LOCAL = Sequel.sqlite("#{File.expand_path("../../../../db/
janitor.db", __FILE__)}")

    class User < Sequel::Model

      class << self
        def create_table
          LOCAL.create_table? :users do
            String :login
            String :id
            String :first_name
            String :last_name
            primary_key :login
          end
        end

        def delete_table
          LOCAL.drop_table(self.table_name)
        end

        def no_role
          Net::LDAP::Filter.present("uid") &
Net::LDAP::Filter.negate(Net::LDAP::Filter.present("pdsrole"))
        end
      end
    end
  end


However, when I try to create a new instance I get an error that the
login= method doesn't exist:

DB::User.new login: "bob", id: "3825", first_name: "Bob", last_name:
"Anderson"
> Sequel::Error:
>   method login= doesn't exist

A check on the columns in the table before the call to new shows that
login exists in the database:
LOCAL[:users].columns
>login
  id
  first_name
  last_name

How can I further troubleshoot why it isn't finding the login column
or creating the login accessor?

Thanks,

Glen

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to