vermonster / copycat Goto Github PK
View Code? Open in Web Editor NEWCopycat is a Rails engine that allows editing live website copy using existing i18n view helpers
License: MIT License
Copycat is a Rails engine that allows editing live website copy using existing i18n view helpers
License: MIT License
Getting the "undefined method `attr_accessible' for #Class:0x007fa32ee13ab0" error as we need to use strong parameters.
I would like to change the copycat url to something other than /copycat_translations.
Rails initialization invokes I18n.translate after the engine is loaded. This leads to AR query, which fails if the table doesn't exist, which is the case when the installation migration is running.
We need a generator that creates an initializer. The initializer sets the username and password. Those should be randomly generated by the generator and reported in output of install command.
The migration should also be installed with the one command 'rake copycat_plugin:install'
The original LIKE implementation was reported to be incompatible with MySQL. The subsequent implementation used .to_sql of arel but that appears to require a recent version of either Rails or Arel, and isn't compatible with Rails 3.1.
Couldn't find all CopycatTranslations with 'id': (all, {:select=>"distinct locale"}) (found 0 results, but was looking for 2)
Looks to be because of the line CopycatTranslation.find(:all, select: 'distinct locale')
. I think it may not be supported in latest Rails maybe? CopycatTranslation.all.select('distinct locale').map(&:locale)
works
Is there an easy way to enable in-place editing for fields if you're logged in as an admin? I started looking into best_in_place, but it seems to want to modify model fields and copycat is based on translations. If anybody has solved this already, I'd love to know how to do it.
If nobody has, this would be an awesome feature.
...so that we know what we're changing it from.
Should also show the default value after deleting an item, which seems to make it use its default.
HTTP Basic Authentication to protect the controller. username and password are set in the initializer
Are there further optimizations that can be made to code or schema to support high concurrency for copycat_translations lookups. We're seeing some latency to the database table at high concurrency.
Thanks.
Currently, the first time a key is looked up by copycat, and it doesn't find the key in the DB, it cascades the lookup to Rails (en.yml), and then always creates a new entry in the DB for that key with whatever value was in the yml. If there was no value it still creates a key with a blank value. That means if somebody later adds a value to the yml it will not make it to the copycat table because subsequent lookups will find the key in the db and never cascade to the yml lookup.
Add a configuration option to not cache keys with no values. That way if a developer adds the key to the template and renders the page before writing the value in en.yml, it won't prevent them from seeding the values later when they add values to the yml.
more
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.