Updated for Rails 4.0.0+
-
Set up the
bowergem. -
Follow the Bower instructions and list your dependencies in your
bower.json, e.g.// bower.json
{
| #=Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| #=Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click_on('Button Value') |
| # also you need to uncomment next line in Capfile | |
| # require 'capistrano/rails/assets' | |
| namespace :deploy do | |
| namespace :assets do | |
| Rake::Task['deploy:assets:precompile'].clear_actions | |
| desc 'Precompile assets locally and upload to servers' | |
| task :precompile do |
Updated for Rails 4.0.0+
Set up the bower gem.
Follow the Bower instructions and list your dependencies in your bower.json, e.g.
// bower.json{
| <?php | |
| /** | |
| * Usage: | |
| * Send the url you want to access url encoded in the url paramater, for example (This is with JS): | |
| * /twitter-proxy.php?url='+encodeURIComponent('statuses/user_timeline.json?screen_name=MikeRogers0&count=2') | |
| */ | |
| // The tokens, keys and secrets from the app you created at https://dev.twitter.com/apps | |
| $config = array( |
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.9' | |
| # Postgres Database | |
| gem 'pg' | |
| # Twitter API | |
| gem 'twitter' |
| // Sharpen an image if it has become blurry due to upscaling or downscaling | |
| // https://developer.mozilla.org/en/CSS/image-rendering | |
| @mixin sharpen-image | |
| image-rendering:-moz-crisp-edges | |
| // When photos are upscaled or downscaled, they often get blurry. Don't use | |
| // this on flat color images, they will still appear blurry. | |
| // https://developer.mozilla.org/en/CSS/image-rendering | |
| @mixin high-quality-image | |
| image-rendering:optimizeQuality |
| /** | |
| * Convert "Kana" one from another | |
| * (zen-kaku, han-kaku and more) | |
| * | |
| * @param string str | |
| * @param string option (optionaly) | |
| * @return string converted string | |
| */ | |
| function convert_kana (str, option) { | |
| option = option || "KV"; |
##References
##Create Models
Create tables:
rails g model Location
rails g model User
rails g model Checkin
| license: gpl-3.0 |