hey @ryan! I used your home brew in a rails 4 app, but the self.by_votes method doesn't seem to work. As is... it orders things, but it duplicates each item for each time they've been voted on. I was wondering if you had any ideas?
for the user_id, you can do params[:photo][:user_id] = current_user.id or something like that. I'm still trying to figure out how to capture the photo name...
any further notes on this? I added 'content-type' => 'file' as a placeholder, and added the data.form.find('#content-type').val(file.type) to the coffee file above the data.submit()... nada. Images stop uploading.
but I, too, am getting the application/octet-stream warning...
I'd like to pass a parameter to the datatable.rb... specifically, the @user = User.find(params[:id]). Side note, I'd also like to be able to use current_user in the new class. I haven't tried it, so I'm not sure if that will even work.
hey @ryan! I used your home brew in a rails 4 app, but the
self.by_votes
method doesn't seem to work. As is... it orders things, but it duplicates each item for each time they've been voted on. I was wondering if you had any ideas?I'm crying laughing at that xkcd comic. Let's be friends =)
shorthand...
for anyone that comes across it... the format that it needs to be in is just a string of ids, separated by commas.
If I want to create a Book manually, how do I pass the Authors manually? An array doesn't seem to work. I'd basically like to do something like:
I need to call the create action from another model... and I can't seem to pass the author_tokens properly.
how do I capture
params[:photo][:name]
?for the user_id, you can do
params[:photo][:user_id] = current_user.id
or something like that. I'm still trying to figure out how to capture the photo name...any further notes on this? I added
'content-type' => 'file'
as a placeholder, and added thedata.form.find('#content-type').val(file.type)
to the coffee file above thedata.submit()
... nada. Images stop uploading.but I, too, am getting the application/octet-stream warning...
I'd like to pass a parameter to the datatable.rb... specifically, the @user = User.find(params[:id]). Side note, I'd also like to be able to use current_user in the new class. I haven't tried it, so I'm not sure if that will even work.
Thoughts?