Some CoffeeScript (verbosely commented for clarity)
# Override Rails handling of confirmation
$.rails.allowAction = (element) ->
# The message is something like "Are you sure?"
message = element.data('confirm')| class Country < ActiveRecord::Base | |
| has_many :registrations | |
| has_many :members | |
| has_many :distribution_groups, :through => :members | |
| end | |
| class DistributionGroup < ActiveRecord::Base | |
| has_many :members | |
| has_many :countries, :through => :members | |
| end |
| ======= Prolbem ================================================================================================================= | |
| I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute: | |
| rake db:create , command I get: | |
| PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) | |
| HINT: Use the same encoding as in the template database, or use template0 as template. | |
| : CREATE DATABASE "my_db_name" ENCODING = 'unicode'....... | |
| bin/rake:16:in `load' |
| <<APP>> change this variables |
Bootstrap 3.0 gives you access to the awesome icon set icon set by these dudes but it's not obvious for a Rails newbie like myself to get it all working together nicely
RAILS_ROOT/vendor/assets/stylesheet/bootstrap-glyphicons.css/dist/fonts from the Bootstrap 3.0 download to a new folder in your Rails app RAILS_ROOT/vendor/assets/fontsconfig.assets.paths << Rails.root.join("vendor","assets", "fonts") to application.rb after the line that has class Application < Rails::Application.bootstrap-glyphicons.css modify the the `url| # First install tmux | |
| brew install tmux | |
| # For mouse support (for switching panes and windows) | |
| # Only needed if you are using Terminal.app (iTerm has mouse support) | |
| Install http://www.culater.net/software/SIMBL/SIMBL.php | |
| Then install https://bitheap.org/mouseterm/ | |
| # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
| <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?language=fra&sensor=false"></script> | |
| <script type="text/javascript"> | |
| var map; | |
| var Markers = {}; | |
| var infowindow; | |
| var locations = [ | |
| [ | |
| 'Samsung Store Madeleine', | |
| '<strong>Samsung Store Madeleine</strong><p>5 Boulevard Malesherbes, 75008 Paris<br>10h – 20h</p>', | |
| 48.8701925, |
| <!-- add to head of your theme.liquid after moving the files into the assets folder | https://www.woothemes.com/flexslider/ --> | |
| <!-- add only if you theme is not already including Jquery--> | |
| {{ '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' | script_tag }} | |
| <!-- FLEX Slider css and .js --> | |
| {{ 'flexslider.css' | asset_url | stylesheet_tag }} | |
| {{ 'jquery.flexslider.js' | asset_url | script_tag }} | |
| <!-- | |
| add to schema json |
| # install build dependencies | |
| sudo yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel | |
| # clone and install rbenv environment | |
| cd ~ | |
| git clone git://github.com/sstephenson/rbenv.git .rbenv | |
| git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile |