[英]FullCalendar Rails Engine Gem Add / View
I created a new rails project and fullcalendar_engine is a gem and installed to the folder /.rvm/gems/ruby-2.2.1/gems/fullcalendar_engine-1.0.6. 我创建了一个新的rails项目,fullcalendar_engine是一个gem,并安装到了/.rvm/gems/ruby-2.2.1/gems/fullcalendar_engine-1.0.6文件夹中。 If I add a new column to the fullcalendar_engine_series table in MySQL.
如果我在MySQL中的fullcalendar_engine_series表中添加新列。 How can I add data from a new rails project to fullcalendar_engine_series table?
如何将新Rails项目中的数据添加到fullcalendar_engine_series表中? And how can i view data the calendar by a specific user?
以及如何查看特定用户的日历数据? I understand that I can't modify the gem inside.
我了解我无法修改其中的gem。
Fork the gem, modifying the tables is almost as bad as modifying the code without forking it. 分叉宝石,修改表几乎和不分叉地修改代码一样糟糕。 What if a future version of the gem drops the table in a migration.
如果gem的未来版本在迁移中删除表怎么办。 It sounds like you want to add functionality to the gem without modifying the gem.
听起来您想在不修改gem的情况下向gem添加功能。
Add to Event and EventSeries 添加到Event和EventSeries
belongs_to :user 当属:用户
Add user_id foreign keys to event tables via migration 通过迁移将user_id外键添加到事件表
Add to User 添加到用户
has_many :events has_many :event_series has_many:events has_many:event_series
Bump the gem version 碰撞宝石版本
Just a rough idea of how it could be done 只是大概的想法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.