Thoughts, information and reflections about technology

Ruby-on-rails

Ruby on Rails Tips including general tips and specific coding methods.

 

1 2 3 5

Adding icons for editing, deleting and saving records in Ruby on Rails

Last Updated on

When you are working with Ruby on Rails and run a scaffold, you will have edit and destroy options on each resulting record in the index for that particular scaffold. The edit and destroy links are simply link_to’s that point to the appropriate action. The issue is that the words ‘edit’ and ‘destroy’ or ‘delete’ will sometimes take up some valuable real estate.

Continue reading

Accessing an external sql database from a rails app where the schema prefix differs from the schema prefix used for the app’s tables.

Last Updated on

This covers a situation where you need to have rails access an external sql database other than the database used for the application. For example, you might need to pull information from one table to populate fields in your current application.  This is further complicated if your application is using a schema prefix.

Continue reading No tags for this post.

Use whoami to check before running bundle install so you don’t run it as root

Last Updated on

I screwed up my droplet (ruby on rails) on my digitalocean hosting by running bundle install as root. When you do that, there is a warning that this will break rails for other users. I haven’t taken the time to figure out how to fix that. Since I was getting started with that hosting, I decided to simply delete the existing droplet and recreate it.

Continue reading No tags for this post.
1 2 3 5
Contact me
Archives
Categories
Recent Comments