#railstips search results
#RailsTips ๐ธ Small hack to reduce database call๐ On optional association, when u want to check associated model presence(country), instead of using - โฏ ๐๐๐ฒ๐ฟ.๐ฐ๐ผ๐๐ป๐๐ฟ๐.๐ฝ๐ฟ๐ฒ๐๐ฒ๐ป๐? you can use โฏ ๐๐๐ฒ๐ฟ.๐ฐ๐ผ๐๐ป๐๐ฟ๐_๐ถ๐ฑ.๐ฝ๐ฟ๐ฒ๐๐ฒ๐ป๐? #RubyOnRails
#RailsTips ๐ธ Did u know that ActiveSupport::Inflector class has methods for transforming words & strings between different formats? This week we'll be going to explore couple of methods that you might not aware of. Have a look - #RubyOnRails
#ActiveSupport's `.presence` lets us write cleaner code. It returns the object if it's present, nil otherwise. No more tedious nil checks! Easily assign a default value when the parameter is nil or empty! #RailsTips #RubyTips #CleanCode
#RailsTips ๐ธ More hidden gems from the ActiveSupport::Inflector class! Today we're exploring two methods you may not know about: demodulize and deconstantize. These can be handy for dynamically generating class and module names based on other information. #RubyOnRails
#RailsTips ๐ธ Discovering more hidden gems from ActiveSupport::Inflector today! Check out constantize for dynamically loading class based on its name (great for plugins) and safe_constantize for gracefully handling cases where class may not exist. Have a look - #RubyOnRails
#RailsTips ๐ธ Rails framework has lots of configs available. This week we'll be going to explore couple of configs that will be useful for most Rails apps - ๐ ๐ฐ๐ผ๐ป๐ณ๐ถ๐ด.๐ฑ๐ถ๐๐ฎ๐ฏ๐น๐ฒ_๐๐ฎ๐ป๐ฑ๐ฏ๐ผ๐ ๐ ๐ฐ๐ผ๐ป๐ณ๐ถ๐ด.๐ณ๐ผ๐ฟ๐ฐ๐ฒ_๐๐๐น Have a look - #rubyonrails #rails
#RailsTips ๐ธ Ready to explore more of ActiveSupport::Inflector? Today we're introducing ordinal and ordinalize, great for formatting dates and times, rankings, or any numbers in a user-friendly way. Have a look - #RubyOnRails
#RailsTips ๐ธ You can use the `render` method to display content in a different format such as JSON or XML. This can be useful when working with APIs. For example, to render a JSON response, you can add the code from this code-snippet to your controller action - #RubyOnRails
#RailsTips ๐ธ Have you heard `assert_valid_keys` method from Hash class in Rails? It provides easy way to validate the keys of hash against list of expected keys and raises error if hash contains any keys that are not included in the expected list - #RubyOnRails #Rails
#railstips Interesting way to use `find_or_create_by` when you want to find by one parameter but create with additional parameters.
๐ Rails tip of the day: To eliminate N+1 query woes, always preload associations with `includes`: Save those DB hits! ๐ #RubyOnRails #RailsTips
Protecting sensitive data in Rails logs is crucial for security & audit purposes. #securitytips For example, lets you hide the user's email id/CC from the log, it's quite simple #rails #railstips #part2 #rubyonrails
#RailsTips ๐ธ Today we'll explore another useful method from the Active Support::Inflector class: #parametrize. Convert any string to a URL-friendly format, great for generating slugs, file names, and SEO-friendly URLs. Check it out! #RubyOnRails
Save time & streamline your responses with #RubyOnRails' head method! Easily send HTTP status codes without extra content. Perfect for handling situations & errors gracefully. #RailsTips #CodingTips
๐ Keep your Rails app dependencies up-to-date with a simple command: ๐ bundle outdated โ๏ธ Lists outdated gems without making changes โ๏ธ Lets you focus on safe, selective updates โ๏ธ Reduces risk of breaking changes Stay ahead of tech debt! #RubyOnRails #RailsTips
We start by creating a modal View Component for modular, reusable UI. ๐ ๏ธย Use Turbo Frames for dynamic content or static content for simplicity. The HTML structure includes a backdrop, panel, and form submission logic. #RailsTips
Ultimate Guide for the Best Ruby on Rails Resources #RubyOnRails #RailsDev #RailsTips #RubyOnRailsResources #RailsTutorial #RailsCommunity #RailsGuides #RSHWebServices rshweb.com/blog-ruby-on-rโฆ
Essential Rails console tips help you improve on productivity, quick thread #rails #railstips #part1 #rubyonrails ๐งต
hkob ใฎ้่จ้ฒ็ฌฌ185ๅใงใฏใNotionRubyMapping ใฎ FileBlock ใฎใใใฅใขใซไฟฎๆญฃใซใคใใฆ่ชฌๆใใFileBlock.new ใฎๅผๆฐใฎๅคๆดใ file_upload_object ใกใฝใใใฎ่ฟฝๅ ใ่กใฃใใใจใ่ฟฐในใใใฆใใพใใ(่ฆ็ด by Notion AI) #Notion #RailsTips NotionRubyMapping ใฎโฆ hkob.hatenablog.com/entry/2025/07/โฆ
hkob.hatenablog.com
NotionRubyMapping ใฎใใใฅใขใซไฟฎๆญฃ(3) : hkob ใฎ้่จ้ฒ (185) - hkobโs blog
hkob ใฎ้่จ้ฒ็ฌฌ185ๅใงใฏใNotionRubyMapping ใฎ FileBlock ใฎใใใฅใขใซไฟฎๆญฃใซใคใใฆ่ชฌๆใใFileBlock.new ใฎๅผๆฐใฎๅคๆดใ file_upload_object ใกใฝใใใฎ่ฟฝๅ ใ่กใฃใใใจใ่ฟฐในใใใฆใใพใใ(่ฆ็ด by Notion AI)
๐ง 3 Ruby on Rails TILs You Should Know ๐ โ๏ธ Validate dates smartly โ๏ธ Clean, readable URLs โ๏ธ Optimized image delivery Full post with code & tips ๐ linkedin.com/feed/update/urโฆ #RubyOnRails #RailsTips #TIL #DevLife #Codemancers #WebDev #Rails #DevTips
๐ Rails tip of the day: To eliminate N+1 query woes, always preload associations with `includes`: Save those DB hits! ๐ #RubyOnRails #RailsTips
E2E test your Devise login with Cypress in < 2 minutes. #RailsTips #Cypress #Authentication
We start by creating a modal View Component for modular, reusable UI. ๐ ๏ธย Use Turbo Frames for dynamic content or static content for simplicity. The HTML structure includes a backdrop, panel, and form submission logic. #RailsTips
๐ Keep your Rails app dependencies up-to-date with a simple command: ๐ bundle outdated โ๏ธ Lists outdated gems without making changes โ๏ธ Lets you focus on safe, selective updates โ๏ธ Reduces risk of breaking changes Stay ahead of tech debt! #RubyOnRails #RailsTips
โก๏ธ๐ ๏ธ Turbocharge your Rails controllers now! ๐ Custom filters = Cleaner code ๐ฅ blog.oxyconit.com/streamlining-rโฆ #RubyOnRails #WebDev #RailsTips
๐๐ก๏ธ Fortress your Rails routes in seconds! ๐ HTTP auth made ridiculously simple blog.oxyconit.com/adding-basic-hโฆ #RubyOnRails #WebSecurity #RailsTips
Ultimate Guide for the Best Ruby on Rails Resources #RubyOnRails #RailsDev #RailsTips #RubyOnRailsResources #RailsTutorial #RailsCommunity #RailsGuides #RSHWebServices rshweb.com/blog-ruby-on-rโฆ
โจ RAILS PRO TIPS โจ Take the habit of using pick(*column_names) instead of pluck(*column_names).first โจ๐ซ #ruby #rubyonrails
#RailsTips Helper ๆนๆณๆฏๅ จๅฑๆนๆณ๏ผๅฆๆๅชๆฏไธชๅซๆจก็้่ฆ๏ผๅจๆจก็ๅ ไฝฟ็จๅฑ้จๅ้ๅฐฑ่กไบใ
#RailsTips 85ๆฅ็ฎใงใฏใณใกใณใใฎ็ป้ฒใป็ทจ้ใปๅ้คใใใผใธ้ท็งปใใชใใใใซ TurboFrame ๅใใพใใใใพใใใใฎ้ใซ Flash ใกใใปใผใธใๆ็ปใใใใใซใใฆใใพใใ #Rails ใณใกใณใใฎ turbo frame ๅ: ๅฐๆ็ Rails Tips (85) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
ใณใกใณใใฎ turbo frame ๅ: ๅฐๆ็ Rails Tips (85) - hkobโs blog
RailsTips ็ฌฌ85ๅใงใฏใใณใกใณใใฎ่ฟฝๅ ใป็ทจ้ใปๅ้คใฎ้จๅใTurboFrameๅใใใใผใธ้ท็งปใชใใงๆดๆฐใงใใใใใซใใๆนๆณใ็ดนไปใใฆใใพใใใพใใFlashใกใใปใผใธใTurboFrameใงๆฑใใใใฎๅทฅๅคซใซใคใใฆใ่ฟฐในใฆใใพใใTurboFrameใฏไธ็ฎๆใใๆดๆฐใงใใชใใใใFlashใกใใปใผใธใๆดๆฐใงใโฆ
#RailsTips 84ๆฅ็ฎใงใฏใญใฐใคใณใใฆใใชใๆใฎใชใณใฏๅ้คใชใฉใฆใผใถๅจใใซใใใ็ดฐใใไฟฎๆญฃใใใฆใใพใใ #Rails ใฆใผใถๅจใใฎไฟฎๆญฃ: ๅฐๆ็ Rails Tips (84) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
ใฆใผใถๅจใใฎไฟฎๆญฃ: ๅฐๆ็ Rails Tips (84) - hkobโs blog
RailsTipsใฎ84ๅ็ฎใงใฏใใฆใผใถใผ้ข้ฃใฎใใใคใใฎไธๅ ทๅใไฟฎๆญฃใใพใใใใญใฐใคใณใใฆใใชใใจใใซๆฐใใ่จไบใไฝๆใงใใชใใใใซใใใญใฐใคใณใชใณใฏใ่ฟฝๅ ใใพใใใใพใใใฆใผใถใผใฎๅๅใ็ฉบใงใใฃใๅ้กใ่งฃๆฑบใใพใใใใณใกใณใใฎ่ฟฝๅ ใใญใฐใคใณใใฆใใใฆใผใถใผใฎใฟใซๅถ้ใใพใใใๆๅใใ่จญ่จใใใฃใใ่กใใชใใจใใใฎใโฆ
#RailsTips 83ๆฅ็ฎใงใฏใณใกใณใใขใใซใซใฆใผใถใ่ฟฝๅ ใใใฎใงใใใใซๅฏพๅฟใใใณใณใใญใผใฉใฎใในใใจๅฎ่ฃ ใไฟฎๆญฃใใพใใใ #Rails ใณใกใณใใซใฆใผใถใ่ฟฝๅ (ใณใณใใญใผใฉใฎไฟฎๆญฃ): ๅฐๆ็ Rails Tips (83) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
ใณใกใณใใซใฆใผใถใ่ฟฝๅ (ใณใณใใญใผใฉใฎไฟฎๆญฃ): ๅฐๆ็ Rails Tips (83) - hkobโs blog
Rails Tips ใฎ 83 ๅ็ฎใงใฏใใฆใผใถใผใใณใกใณใใซ่ฟฝๅ ใใๆนๆณใๅญฆใณใพใใใใขใใซใซใฆใผใถใผใ่ฟฝๅ ใใๅพใrequest spec ใไฟฎๆญฃใใใณใณใใญใผใฉใๆญฃใใๅไฝใใใใใซๅคๆดใใพใใใใฅใผใๅๆงใซไฟฎๆญฃใใ็นใซ articles/comments/_form.html.haml ใจ articles/cโฆ
#RailsTips 82ๆฅ็ฎใงใฏใณใกใณใใซใใฆใผใถใ่ฟฝๅ ใใพใใใใกใใฏ่จไบใจ็ฐใชใ nil ใ่จฑๅฏใใ้ข้ฃใซใใฆใฟใพใใใ #Rails ใณใกใณใใซใฆใผใถใ่ฟฝๅ : ๅฐๆ็ Rails Tips (82) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
ใณใกใณใใซใฆใผใถใ่ฟฝๅ : ๅฐๆ็ Rails Tips (82) - hkobโs blog
RailsTipsใฎ82ๅ็ฎใฏใใณใกใณใใซใใฆใผใถใผใ่ฟฝๅ ใใๆนๆณใ่ชฌๆใใฆใใพใใ่จไบใจๅๆงใใณใกใณใใซใuser_idใ่ฟฝๅ ใใพใใใใณใกใณใใฎuser_idใซใฏnullใ่จฑๅฏใใใฆใใ็นใ็ฐใชใใพใใใใใฏใฆใผใถใผใๅ้คใใใๆใซใใฆใผใถใผใชใใฎใณใกใณใใๆฎใใใจใๅฏ่ฝใซใใใใใงใใ(่ฆ็ด by Notion โฆ
#RailsTips 81ๆฅ็ฎใงใฏไปฅๅไฝๆใใ owned_by? ใไฝฟใฃใฆใๆจฉ้ใฎใชใใชใณใฏใ็บ็ใใใชใใใใซใใพใใ #Rails ่จไบใฎใใฅใผๆดๆฐ (ใฆใผใถๆจฉ้): ๅฐๆ็ Rails Tips (81) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
่จไบใฎใใฅใผๆดๆฐ (ใฆใผใถๆจฉ้): ๅฐๆ็ Rails Tips (81) - hkobโs blog
Rails Tipsใฎ81ๅ็ฎใงใฏใๆๆใใชใใชใใธใงใฏใใซๅฏพใใ็ทจ้ใๅ้คใฎใชใณใฏใ็บ็ใใใชใๆนๆณใ็ดนไปใใพใใใ่จไบใฎๅท็ญ่ ใๅใซ่ฟฝๅ ใใeditใจdestroyใฎใชใณใฏใฎๅใซowned_by?ใงๆจฉ้ใ็ขบ่ชใใใใจใใใคใณใใงใใใพใใใฆใผใถ้ขไฟใฎๅฆ็ใ่จไบใซ้ฉ็จใใพใใใๆฌกๅใฏใณใกใณใใซใใฆใผใถใ่ฟฝๅ ใใไบๅฎใงโฆ
#RailsTips 80ๆฅ็ฎใงใฏ update, destroy ใงใๆๆๆจฉใฎ็ขบ่ชใใงใใฆใใใใจใใในใใง็ขบ่ชใใพใใ #Rails ๆๆใใชใใชใใธใงใฏใใฎๅฆ็(ใในใใ่ฟฝๅ ): ๅฐๆ็ Rails Tips (80) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
ๆๆใใชใใชใใธใงใฏใใฎๅฆ็(ใในใใ่ฟฝๅ ): ๅฐๆ็ Rails Tips (80) - hkobโs blog
RailsTips 80ๅ็ฎใงใฏใๆๆๆจฉใ็ขบ่ชใใใในใใใใณๅฎ่ฃ ใ่กใใพใใใๆๆใใชใใชใใธใงใฏใใซๅฏพใใeditใฎๅฏพๅฟใๆธใฟใupdateใdestroyใๅฏพๅฟใๅฎไบใใฆใใพใใใในใใงๅฏพๅฟใๆธใใงใใใใจใ็ขบ่ชใใพใใใๆๆฅใฏใใใซๅใใใฆindexใชใฉใฎๆ็ปใไฟฎๆญฃใใพใใ(่ฆ็ด by Notion AI)
#RailsTips 79ๆฅ็ฎใงใฏ edit ใขใฏใทใงใณใซใใใฆๆๆๆจฉใ็ขบ่ชใใใในใใใใณๅฎ่ฃ ใ่กใใพใใใ #Rails ๆๆใใชใใชใใธใงใฏใใฎๅฆ็: ๅฐๆ็ Rails Tips (79) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
ๆๆใใชใใชใใธใงใฏใใฎๅฆ็: ๅฐๆ็ Rails Tips (79) - hkobโs blog
Rails Tipsใฎ79ๅ็ฎใงใฏใๆๆใใชใใชใใธใงใฏใใซๅฏพใใ็ทจ้ใฎๅฏพๅฟใ่กใใพใใใๆๆใใชใใชใใธใงใฏใใซๅฏพใใใขใฏใปในใ้ฒใใใใ่จไบใฎๆๆ่ ใ็ขบ่ชใใใกใฝใใใ่ฟฝๅ ใใพใใใใใใซใใใๆๆๆจฉใใชใๅ ดๅใซใฏใใใใใผใธใซใชใใคใฌใฏใใใพใใใพใใๆๆๆจฉใ็ขบ่ชใใใกใฝใใใฏไปใฎใขใฏใทใงใณใงใๆๅนใงใใใใใฎใโฆ
#RailsTips 78ๆฅ็ฎใงใฏใฆใผใถใซ้ขใใ่จไบใฎไบใคใฎใกใฝใใใใในใใปๅฎ่ฃ ใใพใใใใใใไฝฟใฃใฆๆๆฅใฏ index, edit ใไฟฎๆญฃใใพใใ #Rails ่จไบใขใใซใฎใในใ่ฟฝๅ : ๅฐๆ็ Rails Tips (78) - hkobโs blog hkob.hatenablog.com/entry/2024/02/โฆ
hkob.hatenablog.com
่จไบใขใใซใฎใในใ่ฟฝๅ : ๅฐๆ็ Rails Tips (78) - hkobโs blog
Rails Tipsใฎ78ๅ็ฎใงใฏใ่จไบใ็นๅฎใฎใฆใผใถใผใฎๆๆ็ฉใใฉใใใ็ขบ่ชใใใกใฝใใowned_by?ใจใ่จไบใๆธใใใฆใผใถใผใฎๅๅใๅๅพใใใกใฝใใuser_nameใฎๅฎ่ฃ ใจใใฎใในใใซใคใใฆ่งฃ่ชฌใใฆใใพใใowned_by?ใกใฝใใใฏใฆใผใถใผIDใฎๆฏ่ผใuser_nameใกใฝใใใฏdelegateใไฝฟ็จใใฆๅฎโฆ
#RailsTips ๐ธ Do you know you can use `๐๐ฎ๐น๐ถ๐ฑ๐ฎ๐๐ฒ๐_๐ฐ๐ผ๐บ๐ฝ๐ฎ๐ฟ๐ถ๐๐ผ๐ป_๐ผ๐ณ` with Rails 7.0 that provides a way to easily validate comparisons with another value, proc, or attribute? Have a look - #RubyOnRails ๐งต(1/2)
#RailsTips๐ธ Do you know you can use `invert_where` with Rails 7.0 to invert an entire where clause instead of manually applying conditions? Have a look - #RubyOnRails
#rubyonrails use the source method to output the source code of a method to the rails console #RailsTips
#rubyonrails with_option method gives us a way to factor out common options in a series of method calls. #RailsTips
#RailsTips ๐๐ปโโ๏ธ We can generate the HTTP Authorization header directly using the "HttpAuthentication::Basic" module #RubyOnRails
#RailsTips Use "ActiveRecord::Type::Boolean.new.deserialize" to map user input to Ruby booleans #RubyOnRails
#RailsTips ๐ธ Do you know how to prevent deletion of records in Rails? Have a look - #RubyOnRails credits - @stevepolitodsgn
#rubyonrails use rails stats to generate the number of classes, lines, methods your controllers, models, mailers and helpers are using #RailsTips
#RailsTips `rails db:migrate:redo` reverts last migration and runs it again. Shortcut for rolling back last migration and running it again in one command. Also takes a `STEP` environment variable which rolls back and migrates STEP count migrations. #RubyOnRails
#RubyonRails provides an easy way to compare Date, DateTime, Time, and TimeWithZone using before? and after? methods. #RailsTips
#RailsTips Use `Object#presence` to get the object value if present or nil if not present. Helps avoid a conditional to check if the value is present and then get the value. #RubyOnRails
#RailsTips Use `change_column_default` in migrations to manage default values of columns #RubyOnRails
#RailsTips Want to see column names of a model in rails console without opening the database console? Use `Model.column_names` #rubyonrails
#RailsTips ๐ธ Do you know how to enqueue jobs quickly with Sidekiqโs bulk features? Advantages - โข Minimises round trips to Redis โข Less complex Ruby objects & thus less memory Checkout next tweet for more info ๐ credits - @andycroll #RubyOnRails
#rubyonrails use to_sql and explain methods to analyze SQL queries generated by ActiveRecord #RailsTips
#RubyTips #RailsTips Handy numerical methods you can use on daily basis in comparison statements in #Ruby โจ #RubyOnRails #100DaysOfCode #DEVCommunity #Rails #100daysofcoding #100dayschallenge #CodeNewbies
Something went wrong.
Something went wrong.
United States Trends
- 1. Grammy 356K posts
- 2. #FliffCashFriday N/A
- 3. Dizzy 9,852 posts
- 4. Clipse 21.2K posts
- 5. #NXXT 1,108 posts
- 6. Kendrick 63.2K posts
- 7. #GOPHealthCareShutdown 8,006 posts
- 8. James Watson 4,630 posts
- 9. Orban 40.8K posts
- 10. #FursuitFriday 12.1K posts
- 11. addison rae 24.6K posts
- 12. Darryl Strawberry N/A
- 13. Katseye 120K posts
- 14. olivia dean 15.8K posts
- 15. Leon Thomas 20.7K posts
- 16. AOTY 22.1K posts
- 17. Thune 70.3K posts
- 18. ravyn lenae 4,813 posts
- 19. Carmen 47.6K posts
- 20. Alfredo 2 1,073 posts