|
Has anyone used RailsAdmin? Any words of wisdom or warning about it? Edit: I should note that we're looking to use it as a more dynamic and customized scaffold system - something like the built-in scaffold generation, but more extensive, and easy to modify centrally on an ongoing basis. The reviews of it that I'm finding seem to have an "I can take it or leave it" conclusion. Mathematicus fucked around with this message at 18:59 on Nov 10, 2016 |
# ? Nov 10, 2016 18:17 |
|
|
# ? May 28, 2024 15:03 |
|
I've used that, ActiveAdmin and Administrate. Check out Administrate.
|
# ? Nov 10, 2016 19:07 |
|
Mathematicus posted:Edit: I should note that we're looking to use it as a more dynamic and customized scaffold system - something like the built-in scaffold generation, but more extensive, and easy to modify centrally on an ongoing basis. The reviews of it that I'm finding seem to have an "I can take it or leave it" conclusion.
|
# ? Nov 10, 2016 23:12 |
|
Thanks for the tip. After looking at RailsAdmin for a while, it looks like it's really just intended to give admin users a quick set of CRUD screens for the app's models that look better than the default scaffold screens. Is that also true of Adminstrate, or does it give you an interface to tackle end-user screens and/or workflow-based screens?
|
# ? Nov 11, 2016 22:20 |
|
I think Administrate literally generates controllers/views for you and then you can do whatever the hell you want to them. RailsAdmin is like a framework level thing thats less flexible? I haven't used it in forever though.
|
# ? Nov 11, 2016 22:48 |
|
Mathematicus posted:Thanks for the tip. That pretty much sums up Rails Admin. The great thing about it is that if your models/associations are properly made it will make a helpful admin panel without much added work. The major downside about it is that it's very restrictive and it makes it very painful to add things to it that are outside of the scope of regular CRUD screens. I will have to give administrate a shot, see if it works better.
|
# ? Nov 11, 2016 23:11 |
|
Are any of you using Chef to deploy your VPS? I've been recently been starting to play with it to deploy my VPS in a more elegant/constant manner. If some of you have a repo with your cookbook I'd be curious to look at it and learn from what you guys use.
|
# ? Nov 14, 2016 20:09 |
|
Definitely use administrate. The DSL driven CMS tools are great until you want to customize a form, then you're in for some trouble. There are also hosted CMS solutions like Contentful, the free tier might cover what you need.
|
# ? Nov 21, 2016 05:40 |
|
I would like to preface this by saying I have literally never coded anything in my life. I would also like to note that the scripts I run require and are written with watir-webdriver and highline During our implementation process we have to do form and document review where we assign signatures which are basically user authorizations to complete and sign forms. This kind of sucks and takes like 2 or 3 hours to get through an entire loving portfolio or chart and all of the god drat signatures. I would like to automate this process and have been googling Ruby on Rails, and Web/Process Automation in order to try and accomplish this. This is entirely web based in a chrome browser through a website that the client and implementation teams interface with. We use ruby scripts to move clients from other software so I know this is possible. This has led me to two conclusions. 1. I am a loving dumbass 2. I am completely lost. Conceptually I would like to accomplish this process by handing the client an excel spreadsheet to fill out, and than somehow extract this data and automating the input process. We pop standard baselines with names so they are fairly standardized dependent upon the industry our client is in. I would like to extract data in the format below: into our web-based enterprise records system. The client and our staff control this by checking boxes on and off on a web page. The document names are fairly standard however the Signature titles such as Admin, IT, etc change based upon the client. For instance instead of Manager, there may be a user profile that utilized a "Compliance Officer" title. I would update the spreadsheet to reflect the clients custom user titles. As a curve ball....there are review signatures. I am not sure how complicated this makes what I want to do.... On the webpage we handle signatures and permissions using check boxes. The boxes are checked to denote the user title has the authorization to work on the form or review it. Through googling and my own research I have realized that I need a big rear end array....that I put smaller arrays that are the forms and their permissions something like... @document_data = [["Document Title A"="Client OM IT ADM Mngr ACNT", "ADM"], [["Document Title B"="INTAKE ADM ACNT"]] for the first two.....i think? I believe that I simply skip whatever is not used, but I want to denote use or non use by using Y or N in the excel spreadsheet....I'm not sure how that translates. Thank you for listening to this word salad does anyone have any idea where to start with this? or how to extract data in such a format from excel/csv? I can worry about data entry after I accomplish that.... edit: Alternatively, is this some real serious poo poo I should not attempt? Waroduce fucked around with this message at 05:43 on Nov 29, 2016 |
# ? Nov 29, 2016 05:39 |
|
So, that's not a horrible, untenable thing to build. It's probably a good starter project (reminds me of some of my first professional things). That said, there's a lot you'll have to learn. 1. Ruby doesn't run in the browser. With Ruby, your code is written and runs on a server, which will require administration, and there's some security concerns. 2. The data structure you're looking for isn't Arrays, it's Hashes. Any time you have a Key/Value pair (like Document Name to Document Title A), that's a hash in ruby. You might use an array for the whole collection of them. It would look more something like: Ruby code:
Don't let it get you down, and ask questions. It's all totally possible.
|
# ? Nov 29, 2016 14:55 |
|
OK so I've been working on this and I asked one of our Dev guys for help. He could probably do this in a day, but he sent me some links and I've been writing gibberish for like a week. He said a CRUD is a n go, and a CSV is going to be the best compromise between ease of coding and ease of use for clients. I'm working off this: Anyway...so I got this going: code:
anyway i'm not really sure were to go from here..... so that outputs hashes: code:
if part that y or n == “y” users << part that is cd/pt/etc (can use gsub(“ Staff”, “”) to get just CD) end end if it has staff it goes under staff, review goes to review. I'm not sure how to like sort that out or code it in, but I can use gsub to remove the "STAFF" portion of the header and than that abbreviation is what appears on our webpage handling user permissions with a checkbox i check on or off to give permission or not. so..i dunno what to do. I feel like one of those monkeys making GBS threads on a typewriter who pooped out 2 sentences to Shakespeare
|
# ? Dec 6, 2016 02:47 |
|
I lost the plot a bit on what you're trying to do. Right now you have an array of hashes likecode:
One thing that's really helpful (especially for newer programmers) is flowcharting your program, or just writing out the program in plain language. That might help you figure out what your next step is.
|
# ? Dec 6, 2016 03:04 |
|
My whole little summary is a few posts up, but I need to click checkboxes with Y and skip the No ones. I have staff signatures and review signatures that dictate who can sign and who has access to documents. We dictate this by clicking checkboxes under the abbreviation of someones title like IT, PT, ADMIN, CD etc. one of my issues is figuring how to sort out Staff and Review signatures though since there are two identical sets of checkboxes with a text box above it saying Staff or Review on our webpage dictating access. Ask me if you need a more concise explanation if my previous and this post didnt really help
|
# ? Dec 6, 2016 03:12 |
|
Waroduce posted:annnnd I'm not really sure where to go from here....and I don't really get hashes but i know I need something like As he lay dying, the last living descendant of the last Aztec high priest whispered: code:
Then you'll have to figure out how to do whatever the end goal for the program is, which I guess is go to a webpage and click particular checkboxes to autofill a form?
|
# ? Dec 6, 2016 04:16 |
|
fantastic in plastic posted:As he lay dying, the last living descendant of the last Aztec high priest whispered: Can you explain your code to me in plain English and how it fits into what i've got? The end goal is yes i need them to click checkboxes for Y. quote:
|
# ? Dec 6, 2016 04:41 |
|
Waroduce posted:Can you explain your code to me in plain English and how it fits into what i've got? Sure. A hash like code:
My snippet should let you loop through all of the elements in a hash and print the key and value for each. My intention in posting it was to try to demonstrate that you'd need to read each element and that you can work with the keys and values individually. I apologize if the way I went about it was too opaque; I thought you were a junior dev rather than someone trying to write something for the first time. If you play around with the snippet, you should be able to construct an if-statement which will shovel all of the "y" values into another array of hashes rather than calling puts (which just displays them to the screen). Then you could do something like loop over that new array, split your keys into, eg, ["PT", "Staff"] and then have some if-statements that do something with that to record which checkboxes need to be checked. Then you'd have a scraper or something navigate to your website and check things appropriately.
|
# ? Dec 6, 2016 05:43 |
|
fantastic in plastic posted:Sure. A hash like OK so I would plug your code right below hashes << Hash[arry[0].zip(row)] And my output would be all that poo poo there.....? What are some resources I can use or read regarding if than staements? Basically idk how to code what I need to get to and I've not a background I've just been piecing together what I need as I move along.
|
# ? Dec 6, 2016 17:11 |
|
Waroduce posted:OK so I would plug your code right below If/Then/Else is the basic Flow Control statement. Flow Control should get you a lot of useful information, but basically, when you are describing the functionality of your program, whenever there's a condition (if there's a y in the field, for example), that's an if/then/else. They're used for conditional logic. For example: Ruby code:
In your case, your check is going to be comparing to a string 'y'. Using something like what got posted before... Ruby code:
|
# ? Dec 6, 2016 20:31 |
|
I just want to chime in and say that it's awesome that you're getting a start with coding and that you have I think the right-size problem for a new developer, but you would probably benefit greatly at this point from taking a day or two to step back and do some beginner Ruby stuff in order to learn key concepts. That way when you run into a problem you can go "oh okay this reminds me of that other example, where they used a <loop/array/conditional/whatever> to solve the problem." I like why's poignant guide to ruby (http://poignant.guide/book/chapter-1.html) but there's also CodeAcademy (https://www.codecademy.com/learn/ruby) if you want something less artsy.
|
# ? Dec 6, 2016 22:27 |
|
Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP.
xtal fucked around with this message at 22:35 on Dec 6, 2016 |
# ? Dec 6, 2016 22:29 |
|
xtal posted:Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP. Aside from PHP being straight to the browser, I wholeheartedly disagree with this. Ruby or Python are excellent first languages. PHP is a horrible first language.
|
# ? Dec 7, 2016 00:28 |
|
xtal posted:Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP. What language would you learn first?
|
# ? Dec 7, 2016 00:46 |
|
C++ then ruby or python. Definitely not php - it's ecosystem doesn't re-enforce good patterns. I came from PHP to ruby and it was such a nice change. KoRMaK fucked around with this message at 01:02 on Dec 7, 2016 |
# ? Dec 7, 2016 00:59 |
|
prom candy posted:What language would you learn first? A well-rounded programmer should IMHO know something like C, something like Lisp and something like Haskell. So there are lots of good options and lots of ways to get there. None of the options are untyped dynamic scripting languages. Starting with one of those serves to hamstring your understanding of computer science when it comes time to learn something with the performance, concurrency or type-safety that Ruby is unable to provide.
|
# ? Dec 7, 2016 01:10 |
|
I have soccer tonight so will look at this later or tomorrow, but I'm not using ruby by choice, it's what we use to run all of our scripts in my department so yeah Also, I used to be in sales (forgive me) for enterprise content management systems and I rubbed elbows with a lot of CIO/CTO decision maker types who always told me ruby on rails is like the next big thing and there's gunna be a bunch of jobs and they'll pay really well and have some longevity cause it's a rare language both in professional settings at like conventions and poo poo and in more personal settings like cigar bars. I heard this from several fortune 100 companies. This was like ~1.5-2 years ago so you guys would probably be in a position to tell me if that's actually true
|
# ? Dec 7, 2016 01:12 |
|
Waroduce posted:I have soccer tonight so will look at this later or tomorrow, but I'm not using ruby by choice, it's what we use to run all of our scripts in my department so yeah 2 years ago the hype wagon was deep in Node.js, so your department is behind the times! Now it's all moved to Go.
|
# ? Dec 7, 2016 01:14 |
|
xtal posted:2 years ago the hype wagon was deep in Node.js, so your department is behind the times! Now it's all moved to Go. It's my (mostly uninformed) impression that, while there will probably be Ruby/Rails jobs for quite a while, RoR has more or less plateaued, and will probably start its long, slow decline in the next few years.
|
# ? Dec 7, 2016 03:00 |
|
Waroduce posted:I have soccer tonight so will look at this later or tomorrow, but I'm not using ruby by choice, it's what we use to run all of our scripts in my department so yeah Ruby on Rails was big 4 years ago. It lets you do a really specific thing (basic CRUD web app/api) really easily if you're willing to adopt the Rails Way To Do Things. A fair amount of consultantware/internal tools/random web APIs are built in it, but of all of the modern web stacks it's among the worst for performance. It's an unusual framework to know because it isn't, to my knowledge, taught in CS programs. It became popular with Silicon Valley startups and consulting firms. Most of the hardcore Ruby people I know are either self-taught or picked it up by chance on some consulting contract.
|
# ? Dec 7, 2016 04:16 |
|
I've been working on a nodejs project and it's just not as good because the community support isn't there. For example, there's no Devise. There is passport, but it doesn't have a handful of the stuff that Devise offers. Bummed to hear that it's such a fad out in the wild because I thought the community and The Rails Way were really good for the language/ecosystem/community. It re-enforces good patterns and opensourced common solutions instead of having to roll your own.
|
# ? Dec 7, 2016 05:22 |
|
KoRMaK posted:I've been working on a nodejs project and it's just not as good because the community support isn't there. For example, there's no Devise. There is passport, but it doesn't have a handful of the stuff that Devise offers. The problem isn't the Rails Way, it's the Ruby Way. You can surely find MVC REST frameworks for any popular language and some of them are directly based on Rails. Although you should be warned that you'll end up wondering why someone would want to do that.
|
# ? Dec 7, 2016 05:28 |
|
Yea, well I think they both exist: The Rails Way is layered on top of the Ruby Way. I like both of them very much. Why are they bad?
|
# ? Dec 7, 2016 05:31 |
|
xtal posted:A well-rounded programmer should IMHO know something like C, something like Lisp and something like Haskell. So there are lots of good options and lots of ways to get there. None of the options are untyped dynamic scripting languages. Starting with one of those serves to hamstring your understanding of computer science when it comes time to learn something with the performance, concurrency or type-safety that Ruby is unable to provide. I don't think this is great advice for someone who just wants to learn enough code to automate parts of their job. If you want to do serious programming as a career then yeah sure but this is way overkill for most.
|
# ? Dec 7, 2016 06:03 |
|
It would be really cool to get into programming but I'm 27 and maybe too old? Plus...idk what a Junior Dev usually makes but its probably less than me...I don't wanna restart a career path but I'd be super open to learning how to do stuff to help out and pad my bonus hence this poo poo right here
|
# ? Dec 7, 2016 06:46 |
|
KoRMaK posted:Yea, well I think they both exist: The Rails Way is layered on top of the Ruby Way. I like both of them very much. Why are they bad? Rails is still very popular and used to make a lot of popular websites. Just because some people are writing their backends in Go doesn't mean everyone is. It's hard to get a picture of how popular anything is in the Grand Scheme of Things, I think we all have our little windows into the world. But my experience tells me even if something is no longer the Most Popular Thing, it may still have a very long tail. xtal posted:Ruby is cool for ad-hoc tasks but if you're investing enough in this to learn a language don't make it Ruby. You might as well start with PHP. Waroduce posted:It would be really cool to get into programming but I'm 27 and maybe too old?
|
# ? Dec 7, 2016 06:56 |
Yeah, there's nothing wrong with learning Ruby or Ruby on Rails, and it's pretty easy to self-teach. It's not going to make you an employed-for-life millionaire automagically, but it's not like it's a total waste of your time either. I think the standard Cavern of COBOL advice for newbies is "go learn python" but starting with Ruby, especially since it's already in use where you work, is fine. Also, learning programming by automating actual problems you have is a lot more fun and engaging than workbook exercises in my experience. Also, don't feel like you had to have been writing assembly in the womb in order to 'learn how to be a programmer'.
|
|
# ? Dec 7, 2016 08:28 |
|
xtal posted:A well-rounded programmer should IMHO know something like C, something like Lisp and something like Haskell. So there are lots of good options and lots of ways to get there. None of the options are untyped dynamic scripting languages. Starting with one of those serves to hamstring your understanding of computer science when it comes time to learn something with the performance, concurrency or type-safety that Ruby is unable to provide.
|
# ? Dec 7, 2016 10:37 |
|
Gmaz posted:But also learning C is a bad idea if a person will just give up. IMO it's better to start with these untyped dynamic languages (e.g. Python, Ruby) because you'll actually be able to build something quickly and having that feedback loop means A LOT to a newbie. Then after you actually built some stuff it's good to start learning C, when you'll realize how some of the things actually work under the hood. C is only one of the languages I mentioned. If untyped dynamic scripting languages are all you're capable of learning you would be more effective in other fields. For those people giving up is the desired goal (my ~10 years of working on commercial Rails apps with idiots has made me tremendously bitter.) Almost all Ruby code I've seen is bad, even that written by professionals, because Ruby makes it easy to do that. At the same time it's not very nice to poo poo all over Rails in the Rails thread so feel free to ignore this. Clearly Rails has a time and place, imho that is not beginners. xtal fucked around with this message at 22:12 on Dec 7, 2016 |
# ? Dec 7, 2016 10:59 |
|
quote:If untyped dynamic scripting languages are all you're capable capable of learning you would be more effective in other fields. I never wrote that. Just that for a lot of people they might be easier to start with than something lower level like C, that doesn't mean they won't EVER be able to learn C, Haskell or what have you. But they might give up if they start with C, or even start to hate programming if they start with it. I am speaking from my experience and communication with others, that's why I never mention Haskell/LISP cause they're rarely used to teach beginners. The statement that starting with dynamic languages will somehow make you unable to learn other concepts not present in those languages, is to me ridiculously absolute and I strongly disagree with it.
|
# ? Dec 7, 2016 13:13 |
|
xtal posted:C is only one of the languages I mentioned. If untyped dynamic scripting languages are all you're capable capable of learning you would be more effective in other fields. For those people giving up is the desired goal (my ~10 years of working on commercial Rails apps with idiots has made me tremendously bitter.) Almost all Ruby code I've seen is bad, even that written by professionals, because Ruby makes it easy to do that. You are way too bitter and I totally disagree with your mindset. Ruby & Python are great starting languages because they send you direct to the key concepts of programming rather than the key concepts of programming languages. Just because someone started with C or Haskell or something of that ilk doesn't mean they'll be any better a programmer. It seems to me that either the companies that you have worked for in your 10 years of rails apps have been doing terrible jobs of either hiring or code review/on-job training. The fact of the matter is that there are bad programmers in every language, but usually what those people need is just to be caught and trained, not derided.
|
# ? Dec 7, 2016 16:42 |
|
|
# ? May 28, 2024 15:03 |
|
Sorry for the everyone!
|
# ? Dec 7, 2016 17:03 |