datamapper / datamapper.github.com Goto Github PK
View Code? Open in Web Editor NEWThe DataMapper Website (was sam/dm-www)
Home Page: http://datamapper.org/
The DataMapper Website (was sam/dm-www)
Home Page: http://datamapper.org/
Most people are still using Rails 2, and will be for awhile. Write a comparison/how-to on moving from AR to DM, or simply so people can understand how to do what was done in AR in DM.
A standard Rails 3.1.x app will include this in the Gemfile
:
group :assets do
gem 'sass-rails', '~> 3.1.5'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
group :test do
# Pretty printed test output
gem 'turn', '~> 0.8.3', :require => false
end
However, rails new project_name -m http://datamapper.org/templates/rails.rb
doesn't preserve any of this, which makes the new app broken since any requests to /assets/*
will fail.
I often find myself doing Google searches with "site:datamapper.org" - perhaps a field for such a custom search might be a useful addition to the site?
Using the logs from this channel we should be able to create better tutorials and documentation.
The list of Community Plugins should be easily found on datamapper.org. We could either add a link to the Community page or make a new page for Community Plugins.
Review http://www.irclogger.com/datamapper/ for solid questions (and hopefully the answers)
Categorize by complexity of the question and experience of the user (if possible)
Looks like DNS configuration needs to be updated:
I remember switching from AR because of certain pain points, things solved by DM.
Properties in the model (so you don't have to keep checking the schema in the DB)
Better associations (through many, more than 1 step away)
Composite primary keys
Please comment with your pain points solved by DM.
We'd like to create a survey for new users of DataMapper to assess where we might improve documentation, and possibly, DataMapper itself. Comments with suggested questions are welcome.
Im trying to do a bulk update maybe about 30000 records , there should be a feature for a bulk update. Now it takes like 5 minutes.
Per Relationship#child_key, the default implementation is:
property_name ||= "#{parent_name}_#{parent_property.name}".to_sym
This suggests that given a Post that belongs to an Author, the inferred child_key
on the:
class Post
belongs_to :author, :model => 'User'
end
declaration would be author_id
, and not post_id
as shown on the associations docs page here.
The very simple fix for this is available at http://github.com/vandrijevik/datamapper.github.com/commit/a1aa49f080f900470cd8b8546fdc6dfe30aa7660
Im trying to do a bulk update maybe about 30000 records , there should be a feature for a bulk update. Now it takes like 5 minutes.
As reported in datamapper/dm-rails#34 (comment) the templates need to remove two ActiveRecord related configuration options in config/development.rb
for Rails 3.2.X:
# Raise exception on mass assignment protection for Active Record models
# config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
Another issue is that the Gemfile currently requires an older version of Rails: 3.1.3
and not 3.2.1. This change would require an update of the dependencies of dm-rails
and dm-active_model
to 1.2.1
While installing the data_mapper gem, I got the following message:
Fetching: dm-validations-1.2.0.gem (100%)
Successfully installed dm-validations-1.2.0
Fetching: bcrypt-3.1.7.gem (100%)
Building native extensions. This could take a while...
Successfully installed bcrypt-3.1.7
Fetching: bcrypt-ruby-3.1.5.gem (100%)
#######################################################
The bcrypt-ruby gem has changed its name to just bcrypt. Instead of
installing `bcrypt-ruby`, you should install `bcrypt`. Please update your
dependencies accordingly.
#######################################################
Successfully installed bcrypt-ruby-3.1.5
Maybe something to look into.
Please comment with any talks/presentations. When we have a couple we'll add the page to dm.org.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.