zvive

Activity Graph

Page 1 of 1

2015-12-01

[05:07:48] zvive: Read error: Connection reset by peer

2015-11-26

[19:01:54] zvive: *.net *.split
[19:08:09] zvive: has joined #RubyOnRails

2015-11-23

[10:02:26] zvive: has joined #RubyOnRails

2015-11-19

[11:41:34] zvive: Ping timeout: 244 seconds
[11:54:52] zvive: has joined #RubyOnRails
[11:54:52] zvive: has joined #ruby
[12:20:38] zvive: Ping timeout: 260 seconds

2015-11-15

[07:41:00] zvive: has joined #RubyOnRails
[08:30:34] zvive: I'm setting up a migration that belongs to a student on student_id in the table, but which actually points at users.id --- would I just to t.references :student, index: true, than add_foreign_key :student, :users, column: user_id ?
[09:33:35] zvive: this is more of a logic question.. but say you have users... and you have teachers, students, parents, and children that all are users.. I currently have a self-referential thing setup matching teachers/students, and parents/children - but wouldn't it be more 'dry' or make sense to just create a relationship with maybe a main_id sub_id type (parent, teacher) where the sub would then be a child or student depending on type?
[09:34:26] zvive: has joined #ruby
[09:43:21] zvive: this is more of a logic question (rails) .. but say you have users... and you have teachers, students, parents, and children that all are users.. I currently have a self-referential thing setup matching teachers/students, and parents/children - via has_many :through via 2 different models. would it be more 'dry' or make more sense to just create a relationship with maybe a main_id sub_id type (parent, teacher) where the sub would then be a child or student dep
[09:43:22] zvive: ending on type, then I could just have a method to get relationships based on type..?
[09:47:59] zvive: debugger is not compatible with Ruby 2.0 or greater...what version of ruby are you running?
[09:49:45] zvive: https://github.com/cldwalker/debugger -- you can replace with byebug it's only needed if you're using it for debugging in the code.. really. Are you upgrading an older app to rails 4/ruby2? Or creating a new rails app?
[09:53:04] zvive: try commenting out that line, and run: bundle

2015-11-14

[06:24:40] zvive: Quit: Leaving

2015-11-12

[21:56:02] zvive: has joined #RubyOnRails

2015-10-31

[23:15:47] zvive: Remote host closed the connection

2015-10-30

[02:04:31] zvive: has joined #RubyOnRails

2015-05-16

[08:35:06] zvive: Hey -- I'm building app w/ angular front/rails back.. -- and We just want to throw a up a landing page for visitors, and route all other pages through /dev/path -- and then just when we go live remove the dev namespace.. so I tried doing namespace :dev do root to: "home#index" but that's looking for dev/home_controller action index I believe...that's how I read the error....but I want just to root to the main home_controller/index method.
[08:50:52] zvive: nvm figured it out... changed the landing just to get "/" to: "home#landing" then put root to inside of a scope, and that matches up nicely so I can swap out when done without too many changes.

2015-05-06

[08:29:56] zvive: hey I have a question... say you're using console to test the Model -- so you're just wanting to run User.create(...) -- how would you do that since attr_accessible is removed?
[08:34:39] zvive: I'm getting unknown attribute for password, --- password isn't actually a value in db, it's just something the model uses, runs through the encrypt_password method before saving the object in the db.
[08:36:02] zvive: https://gist.github.com/pixelgremlins/bca1d9f710a952ca8fc6
[08:37:07] zvive: 4.2 rails has that removed correct?
[08:39:29] zvive: oh, well that's confusing lol got it.. one's for grabbing the other's for putting.
[08:53:45] zvive: got it (did some googling) thx

2015-04-16

[08:03:10] zvive: Say I want to tie two users together as husband/wife for instance... would I do something like this: belongs_to :spouse, :class_name => 'User', :foreign_key => :spouse_id ?
[08:04:59] zvive: Well, it's a wedding app... I could just join everything on the wedding event, so that the wedding joins both spouses but if they marry later on, they would be tied to the other spouse through another wedding event.

2015-04-15

[06:43:10] zvive: Wouldn't it be better to do a Payments table w/ a date, then just search for last payment or payment that matches the user and sort by date?

2015-04-14

[10:17:21] zvive: hey any1 know if possible to run migrations without restarting nginx --was getting pending migration error, but apparently it was just nginx needing a reload, but that's annoying to reload everytime.
[10:23:07] zvive: did that, kept getting db migration error. Till I did sudo service nginx restart -- think I'm gonna just create an alias to do something like RAILS_ENV=development bundle exec rake db:migrate && sudo service nginx restart
[10:24:15] zvive: I use nginx/passenger locally-- my goal was not to have to run rails s in command line, and just have it load/work w/out reload.. kinda like my laravel/php setup, been a year or two since I did a rails app, but wanting to get rails dev position, so working on a demo project for employers to view.
[11:10:52] zvive: anyone know if dotenv gem can be used without reloading my server? changes don't take effect till I reload nginx.
[11:24:07] zvive: yeah if I use: <%= ENV['RAILS_ENV'] %> -- I get development
[11:26:31] zvive: it's all my local dev-- I'm running ubuntu 14
[11:26:53] zvive: same device, nothing special.
[11:27:49] zvive: if I put in my index view it shows development
[11:29:33] zvive: yep all caching settings in development.rb are false
[11:30:05] zvive: if I run sudo service nginx restart my env vars show up.
[11:34:58] zvive: rvanlieshout -- yeah I turned nginx off completely and instead of test.dev loaded: 0.0.0.0:3000 and changed something in .env reloaded and no change.
[11:35:10] zvive: ^^ after running passenger start
[11:39:00] zvive: I've tried dotenv and figaro for env vars... put Dotenv::Railtie.load in application.rb - under Bundler.. etc..
[11:46:40] zvive: eh, not too often, lol but I just hate restarting things when I want to test something out like an API and throw in an APIkey. so I'll spend 4 hours configuring crap to save like 5 minutes here and there lol
[11:49:41] zvive: yeah was thinking of just symlinking ~/.profile to my project and using inotify to just source it if I re-save new vars.
[11:59:48] zvive: I'll look into that, just used to a diff workflow in Laravel, trying to maximize my environment before I get down and dirty in code. :) decided to just link .profile to the app dir., and put export VAR... then source .profile that's so far the easiest method.
[12:02:04] zvive: well, thx for the tips, I need to hit the sack now though.