You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This example will create an uploader that will upload a file stored in a model Model. The file will be stored locally in development and test environment and will use Amazon S3 in production.
gem install heroku
gem install taps
# Export database from heroku
heroku db:pull --app <app-name> # This will replace the data specified in database.yml (most often development database)
heroku db:pull sqlite:// --app # Don't forget to add the extra "/" if you're using an absolut path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Easy way to have full control of asset precompilation
What is this?
It's a way to better handle page specific css and javascript files. It gives you full control of which files are included and compiled where. This is a way to easily minimize the file request while still keeping out unnecessary stuff from the files, without you as a developer need to edit environment files.
Why not controller specific files?
guides.rubyonrails.org mentions a way to easily handle controller specific stylesheets and javascript files. Like:
javascript_include_tagparams[:controller]
Sometimes that's not enough or it will break because of some gem you have installed, and that's when this method comes in handy.
How to serve a vcard properly from amazon s3 in a rails app
This gist shows how to download a vcard with mime-type
It's easy to provide a simple link to download a vcard. The problem is that normal devices doesn't recognize the downloaded vcard and will most often just render them in the browser as plain text.
This gist is an example of how you can download the vcard with proper mime-type, which allows the device to recognize it as a vcard.
Prerequisites
This example assumes that you have a model Contact with a connected vcard. This example was built using a simple carrierwave uploader to upload the vcard to amazon s3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters