Create an account at Stripe 2. Account Setting/Api Key Grab your Api key here 3. Put your Key in secrets.yml as
stripe_secret_key: your key here
stripe_publishable_key: your key here
After setting up stripe account | |
grab the api key | |
1. | |
In your secrets.yml | |
stripe_secret_key: dsfadasfsadfsadfdsa | |
stripe_publishable_key: sdafdsafdsafdsafdsafsdaf |
Create an account at Stripe 2. Account Setting/Api Key Grab your Api key here 3. Put your Key in secrets.yml as
stripe_secret_key: your key here
stripe_publishable_key: your key here
Performance improvement can be done in all levels
Browser View Controller Model/DB
prematurely adjusting the app for performance is not optimal as it will slow the development time
draper gem
gem 'draper' in your gemfile
bundle
You generate a decorator for a specific object
##Delayed Job/Backgorund Job
1 brew install redis
2 To start the server redis-server
3
##Active Admin
This will fetch the latest from git
gem 'activeadmin', github: "activeadmin/activeadmin"
active admin depends on gem 'devise'
example of fundsy
gem "geocoder"
You have to turn the address into longetude and latitude
rails generate migration AddLatitudeAndLogitudeToModel(name) latitude:float longitude:float
bin/rails g controller my_campaigns
resources :my_campaigns, only: [:index]
<%=link_to "My projects", my_campaigns_path%>
before_action :authernticate_user
def index @campaigns = current_user.campaigns
This line of code in campaign model will allow users to feed data about rewards accepts_nested_attributes_for :rewards, reject_if: :all_blank
_form.html.erb
<%= f.simple_fields_ for :rewards do |r| %> <%= r.input :title%> <%= r.input :amount%> <% end %>
#What is React.js?
client side With few core concepts you can build a fully functional application