sideshowcoder / activerecord_translatable Goto Github PK
View Code? Open in Web Editor NEWTranslatable attributes for activerecord using the I18n backend provided by rails
License: MIT License
Translatable attributes for activerecord using the I18n backend provided by rails
License: MIT License
if there are no translations set for the values marked as translatable in the model the current implementation throws an error (undefined method `each' for nil:NilClass)
creating a class which includes translateable but does not actually uses it results in a save failure when saving the class to the db
class Something < ActiveRecord::Base
include ActiveRecordTranslatable
end
s = Something.new
s.save => will fail
currently there is a dependency set for rails, which is not needed as a whole, so it should be cleaned.
Translating should be possible even if the database does not support native arrays to save the locales in
This should ease the setup
Handle setting up a model for translatable
After reading and writing for a couple times, for some reason the symbols get duplicated
mymodel.translatable # => [:name, :name, :name]
the project was created with testunit but is tested via rspec, so testunit should be removed from the called generators.
Currently creating a new model via
$ rails g model MyModel
will create a a test directory with the needed testfiles
When a model is deleted cleanup all stored translations for it
Currently translatable is included in ActiveRecord instead of the model... which is wrong... This means the translatable fields are defined across all models instead of just the one they are for!
When a model is saved make sure that any stored translation which are no longer needed are deleted
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.