All Questions
Tagged with code-snippets ruby-on-rails
13 questions
0
votes
0
answers
129
views
Event on click only when user sign up successful ruby on rails
I have an event snippet for log sign-ups in my ruby on rails project. When a user creates an account (click on sign up) it will load the javascript with the snippet, but I want to load the javascript ...
2
votes
1
answer
238
views
Building an web app to run inside other apps through a JS code-snippet
I was given the task to develop sliders/pop-ups for customers of the company I work for. This works a bit like chatbots (ie. Intercom). The user sees a small bubble on the bottom-right corner, clicks ...
0
votes
1
answer
1k
views
VS Code User Snippets for HTML.ERB Files Only
I'm trying to include snippets from the Github repository ERB-VSCode-Snippets in my Ruby on Rails project. The json data are found here. I only want to use them in html.erb files. The documentation ...
1
vote
1
answer
1k
views
Adding CodeSnippet Plugin to CKEditor in Rails App
I am trying to add the CodeSnippet plugin to CKEditor (installed in my Rails app using ckeditor-rails). To do this, I first added the CodeSnippet plugin folder and all of its dependencies to the ...
4
votes
0
answers
614
views
Any way to extract method signature from Ruby?
I want to parse this module MiniTest::Assertions,
and get array of string like this:
assert(test, msg = nil)
assert_empty(obj, msg = nil)
assert_equal(exp, act, msg = nil)
assert_in_delta(exp, act,...
2
votes
2
answers
1k
views
Override snippet in Sublime Text
In Sublime Text 2, I'd like to create a snippet for Rails image_tag.
I want it to be a trigger, but it seems that it is already taken by <input>.
I'd like to remove <input> snippet at all....
0
votes
1
answer
480
views
Aptana Studio 3 Snippet Around Selection
So I have recently switched from Dreamweaver to Aptana Studio 3 and I have been playing around with the whole custom snippet feature. For the life of me though I cannot figure out how to take a ...
2
votes
1
answer
1k
views
How do I insert and render code snippets on a Haml page for a Rails app?
I have html and javascript code snippets that I want to render on a haml page, how do I do it? I'm looking for something that is similar to the html syntax of <pre><code>. Much thanks.
12
votes
4
answers
26k
views
How do I setup/use ruby on rails snippets and autocomplete in sublime text 2?
I would appreciate if someone could direct me to a website that shows how to do this..
Can't seem to find anything decent enough via google.
This will be the first time I'm doing this kind of thing ...
-1
votes
1
answer
164
views
How to quote in sinatra/rails app code snippet?
I'm trying to write in sinatra the blog app. I want to quote in my post code snippet. How to add a gems like: CodeSnippets or Snippet or another to make it work? Do you know of any good examples?
13
votes
7
answers
9k
views
Vim html.erb snippets?? snipMate Need a vim tip
When I'm in an html.erb file, I get no snipMate snippets.
I would like both HTML and Ruby, or just HTML would be fine,
How would I do this?
Would I need to write a set of snippets?
If so, is there ...
0
votes
2
answers
94
views
Debug Error in Ruby script
I'm very new to Ruby. I have the following piece of code which is giving me an error.
class ItemsController < ApplicationController
def populate
Location.all.each { |l|
place = l....
3
votes
7
answers
261
views
How do you remember/organise Rails information to prevent wheel reinvention? [closed]
I love working with Rails but I keep tripping up against my own inefficiency: I'll spend time implementing some "useful" function only to discover subsequently that it was already in the framework, ...