qiushibaike / moumentei Goto Github PK
View Code? Open in Web Editor NEW本项目由糗百原先使用的rails框架代码整理而成
Home Page: http://www.qiushibaike.com
License: Other
本项目由糗百原先使用的rails框架代码整理而成
Home Page: http://www.qiushibaike.com
License: Other
find :conditions
替换成scope现在使用的是serialized column,导致每次查询的负担较重
改用settings 表和
NoMethodError in Admin/settings#edit
Showing app/views/admin/settings/edit.erb where line #26 raised:
undefined method `join' for "":String
Extracted source (around line #26):
23:
24:
Application Trace | Framework Trace | Full Trace
C:/Users/GONG/Documents/GitHub/moumentei/app/views/admin/settings/edit.erb:26:in _run_erb_app47views47admin47settings47edit46erb' C:/Users/GONG/Documents/GitHub/moumentei/app/views/admin/settings/edit.erb:2:in
_run_erb_app47views47admin47settings47edit46erb'
Request
Parameters:
None
Show session dump
Response
Headers:
{"Vary"=>"User-Agent",
"Content-Type"=>"",
"Cache-Control"=>"no-cache"}
实现类似于HN的分数排序的功能
Mysql2::Error: Unknown column 'articles.article_id' in 'where clause': SELECT sum(articles
.score) AS sum_score FROM articles
WHERE (articles
.article_id
IN (NULL))
Extracted source (around line #33):
30:
Application Trace | Framework Trace | Full Trace
c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract_adapter.rb:227:in log' c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:265:in
execute'
c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-mysql2-adapter-0.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:615:in select' c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in
select_all_without_query_cache'
c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in select_all' c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in
cache_sql'
c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in select_all' c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in
select_one'
c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in select_value' c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/calculations.rb:237:in
execute_simple_calculation'
c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/calculations.rb:134:in calculate' c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/calculations.rb:130:in
catch'
c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/calculations.rb:130:in calculate' c:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/calculations.rb:84:in
sum'
C:/Users/GONG/Documents/GitHub/moumentei/app/models/user/charm_aspect.rb:12:in total_articles_score' C:/Users/GONG/Documents/GitHub/moumentei/app/views/admin/users/show.erb:33:in
_run_erb_app47views47admin47users47show46erb'
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.