Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Bigg radar

View GitHub Profile
View rules.md

Welcome to #rubyonrails

Please behave in a polite, considerate and inclusive manner in the channel at all times. People volunteer their time in the channel to help people like you with your Rails problems and some respect (in both directions) will go an extremely long way.

These rules are in place so that you can get the quickest and best support from #rubyonrails.

Rule #0: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us.

  1. Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If you're using a method in Rails, look it up in the API Docs or in the Official Guides.
  2. If you've tried Googling, explain what terms you've tried to use so people can better help you.
View Rails 4 Differences.md

Rails 4 Differences

Chapter 1

No differences.

Chapter 2

  • root :to => "dashboard#index" is now root "dashboard#index"`
  • Need to permit parameters within Subscribem::AccountsController
View keybase.md

Keybase proof

I hereby claim:

  • I am radar on github.
  • I am ryanbigg (https://keybase.io/ryanbigg) on keybase.
  • I have a public key ASC-aRDIkJSCR3zgowwQoB5OZWdmqFoVWx5hTGyj_m2TPAo

To claim this, I am signing this object:

View spree_vs_magento.md

Spree (vs. Magento)

  • Spree does not offer media management as a CMS function

This is true, but we do have some extensions such as spree_static_content that do provide the ability to create extra pages for your site.

  • One page checkout is available on Magento, but not Spree

Assuming you mean the fields are all on one page: This is not provided by default, but it is relatively easy to customize Spree to do this. It's pretty commonly requested, and so it might be a good idea for us to provide a guide on how to do this.

View Exam.md

JEP Exam Rubric

  • Gemfile entries
    • rubocop (under development)
    • rspec-rails (under development + test)
    • devise (outside of any group)
    • mongoid (outside of any group)
  • Generated Mongoid configuration present at config/mongoid.yml
  • Rubocop rules pass
  • db/seeds.rb
    • Creates a book
View spec and code
it 'has a method that will call the transaction class' do
Transaction.should_receive(:new);
bank.send(:make_deposit, 5);
end
def make_deposit(amount)
Transaction.new(self, 'deposit', amount);
end
@radar
radar / index.html.erb
Created Jun 15, 2018
Problematic code
View index.html.erb
<table>
<tr>
<th>Subject</th>
<th>Created At</th>
<th>Status</th>
</tr>
<% @tickets.each do |ticket| %>
<tr>
<td><a href="/ticket/<%= ticket.id %>"><%= ticket.subject %></a></td>
@radar
radar / file1.txt
Created Feb 26, 2018
the description for this gist
View file1.txt
String file contents
@radar
radar / file1.txt
Created Feb 26, 2018
the description for this gist
View file1.txt
String file contents
View part 2?
totalprice=0
totalitemcount=0
laborcharge=0
discount= 0
totalgccount=0