|
https://github.com/mislav/will_paginate will make all your paginated dreams come true.
|
# ¿ Aug 9, 2013 05:42 |
|
|
# ¿ May 10, 2024 00:25 |
|
So I wrote and published my first gem, based on a need for a personal project. Basically, it allows you to include custom model methods in to_json/to_xml using a simple DSL instead of having to deal with overriding the methods yourself. It's kind of small and silly, but I didn't like how ugly it was to override the methods myself, plus I've been looking for a reason to write a gem that might actually get some use for awhile. Github link Would love to get any feedback/code critiques to learn from. I already learned a ton writing it
|
# ¿ Aug 19, 2013 23:32 |
|
Sounds like an enum! Rails 4.1.0, which is at beta3 status, includes ActiveRecord::Enum in core. Or if you don't feel like living ON THE EDGE there are a few gems that'll do basically the same thing. simple_enum is one I've used.
|
# ¿ Feb 16, 2014 04:29 |
|
semicolonsrock posted:Is there a good general approach to making heavily html/Css/JavaScript sites back ends in Ruby if you really don't need it to do much? Methinks you're looking for Middleman.
|
# ¿ Mar 9, 2015 00:16 |
|
kayakyakr posted:It has the benefit of invalidating when they change their password. Dunno the specifics of your situation, maybe that is actually a good idea, but assuming this is something reasonably generic, API tokens shouldn't be invalidated by a user password change - that'd be totally unexpected behavior, IMO. If possible, just have the client provide a user ID as well as the token, then you can store the token hashed and just compare it, similar to normal auth.
|
# ¿ Mar 28, 2015 06:23 |
|
xtal posted:check out Crystal. This is awesome! Exactly what I've been thinking over the last few days should exist. And it does, and it's actually pretty complete and good. Already got my first PR in
|
# ¿ May 20, 2015 05:08 |
|
Peristalsis posted:It could be worse, our recently departed developer went to a company still on Rails 2 for their product. We have a customer still proudly running REE and Rails 1 in production with no plans to change.
|
# ¿ Sep 2, 2015 16:52 |
|
Pollyanna posted:Let's say something went wrong in production and you have to do some database surgery through ActiveRecord. What's the safest, most accepted way of hotfixing live, production data? Home projects, Rails console. At work, has to be a migration, with the usual code review and testing etc that accompanies any other production code change.
|
# ¿ Nov 11, 2015 19:48 |
|
I would use Sinatra with Sequel (since I'm presuming you aren't familiar with ActiveRecord yet) for this. Rails is way too much framework for what you're trying to do and you will spend more time trying to find which of the 45 auto-generated files you need to modify then actually programming. This should be about 20-30 lines tops with Sinatra, split across a main app.rb file and a view Even if your overall objective is 'I wanna learn Rails' you'll do better by learning some Ruby syntax first and working with these gems, both of which are well-renowned for their elegant simplicity, will help set you up well to not have to learn both Ruby and Rails at once, which is a tough thing to do.
|
# ¿ Jan 19, 2016 20:12 |
|
Pollyanna posted:I'm guessing it's like any other conference, but with more people sitting on the floor with their laptops? And all the laptops are Macs. See you there! PM me if you want a New Relic sticker.
|
# ¿ May 3, 2016 03:50 |
|
Pollyanna posted:I'll be at the New Relic party, so I might see you there Indeed you will. We have like 100+ people wait listed for our lil get-together so it should be fun. Definitely say hi and get a sticker, I'm the tall door-shaped dude in NR swag
|
# ¿ May 4, 2016 16:44 |
|
Also I should've slept in instead of attending this meandering word soup of a keynote
|
# ¿ May 4, 2016 16:47 |
|
code:
|
# ¿ May 12, 2016 20:01 |
|
necrotic posted:^^^ that's some good test numbers. Are they actually useful tests? I feel like they are, I don't directly work on that monolith so I don't deal with it code-wise on a daily basis but in general we seem to have very good quality and testing practices overall, especially considering the contribution volume: We have a number of what probably could be best explained as "service gems" (which I do work on) and there are some circa 2009 tests in the monolith that depend on private APIs in the gems, but as we push new releases and notice the breakage we're cleaning up. So pretty much the usual "legacy codebase" story.
|
# ¿ May 12, 2016 20:40 |
|
necrotic posted:At least we're finally moving off of Ruby 1.9.3... next big upgrade is Rails 3.0 to 3.2 took 3 developers 4 months. Good luck!
|
# ¿ May 12, 2016 21:28 |
|
As you said, you'll want to check your specific app's performance. The other reason it's used is because it can easily interop with Java libraries and SDKs. If you're not doing that or using JRuby-only gems that you can't replace, it's definitely worth an experiment. MRI 2.6 is definitely quite a bit faster than 1.9.3 was.
|
# ¿ May 16, 2019 04:16 |
|
My company is actually working on something in this space (including a devise integration) but it's not quite ready for primetime yet. I had this problem myself on another side project and ended up just putting in recaptcha and haven't had to deal with it since.
|
# ¿ Feb 2, 2021 18:33 |
|
|
# ¿ May 10, 2024 00:25 |
|
necrotic posted:Email verification? If you don't want emails then captchas may be your best option. The problem is that the bots will use real people's emails to signup (I have no idea why or how this benefits the bot author but w/e) and then those people rightly mark your confirmation you sent as spam and your email provider gets pissy. So email confo alone won't really solve the problem.
|
# ¿ Feb 3, 2021 00:57 |